<template>
    <div>
        <!-- 面包屑导航 -->
        <div class="page_top" style="position: absolute;width: calc(100vw - 220px);z-index:100">
            <div class="left_btn" @click="back">
                <img src="../../assets/image/back.png" alt=""/>
            </div>
            <crumbs basetitle="客户" title="客户管理" title1="客户详情"></crumbs>
        </div>
        <div class="content">
            <div class="top_basemsg">
                <div :class="{ nameandststus: true }">
                    <div class="companyname">{{ companyName }}</div>
                    <div class="companystatuslist" @click="chgangecompanystatus">
                        <!--                    <div class="companystatuslist">-->
                        <div>
                            <span class="gray" v-show="cauditStatus == '0'">待审核</span>
                            <span class="blue" v-show="cauditStatus == '1'">审核通过</span>
                            <span class="origin" v-show="cauditStatus == '2'">审核驳回</span>
                        </div>
                        <el-icon>
                            <ArrowDown/>
                        </el-icon>
                    </div>
                </div>
                <div class="openproduct">
                    <div class="l">
                        <img src="../../assets/image/容器(3).png" alt=""/>
                        <span>群发短信剩余条数：{{ smsBalance === null ? '--' : smsBalance }}</span>
                    </div>
                    <div class="r">
                        <img src="../../assets/image/业务.png" alt=""/>
                        <span>已开通业务：
                            <span v-show="openProduct.includes(0)">子弹发薪、</span>
                            <span v-show="openProduct.includes(3)">长期保、</span>
                            <span v-show="openProduct.includes(2)">日日保、</span>
                            <span v-show="openProduct.includes(1)">电子签、</span>
                            <span v-show="openProduct.includes(6)">团意日保、</span>
                        </span>
                        <span class="blue pointer" @click="opencompanyservicestc">设置</span>
                    </div>
                </div>
                <div class="messagebox">
                    <div class="messageitem">
                        <div class="lable">公司简称</div>
                        <div class="lable_content">{{
                                companyAbbreviation === '' || companyAbbreviation === null ? '--' :
                                    companyAbbreviation
                            }}
                        </div>
                    </div>
                    <div class="messageitem">
                        <div class="lable">营业执照编号</div>
                        <div class="lable_content">{{
                                creditCode === '' || creditCode === null ? '--' :
                                    creditCode
                            }}
                        </div>
                    </div>
                    <div class="messageitem">
                        <div class="lable">法人姓名</div>
                        <div class="lable_content">{{
                                legalPerson === '' || legalPerson === null ? '--' : legalPerson
                            }}
                        </div>
                    </div>
                    <div class="messageitem">
                        <div class="lable">客户充值账号</div>
                        <div class="lable_content">{{
                                merchantBankCard === '' || merchantBankCard === null ? '--' :
                                    merchantBankCard
                            }}
                        </div>
                    </div>
                    <div class="messageitem">
                        <div class="lable">所在区域</div>
                        <div class="lable_content">{{
                                area === '' || area === null ? '--' :
                                    area
                            }}
                        </div>
                    </div>
                    <div class="messageitem">
                        <div class="lable">商户号</div>
                        <div class="lable_content">{{
                                subMchid === '' || subMchid === null ? '--' :
                                    subMchid
                            }}
                        </div>
                    </div>
                </div>
                <div class="btnbox">
                    <div class="redact" @click="openeditbox">
                        <img style="margin-bottom: -2px;" src="../../assets/image/容器a(1).png" alt="">
                        编辑
                    </div>
                    <div class="export" @click="derivebasemsg">
                        <img style="margin-bottom: -2px;" src="../../assets/image/Share.png" alt="">
                        导出
                    </div>
                </div>
            </div>
            <div class="tab companydetail" ref="scroll">
                <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
                    <el-tab-pane label="子弹发薪" name="1">
                        <div class="tabcontentbox first">
                            <div class="tablebox">
                                <div class="title">
                                    基本信息
                                </div>
                                <div class="companyse_time">
                                    <div class="l">
                                        <img src="../../assets/image/容器(1).png" alt=""/>
                                        <span>开通时间：{{ paybasemsg_payProductOpenTime }}</span>
                                    </div>
                                    <div class="r">
                                        <img src="../../assets/image/容器(2).png" alt=""/>
                                        <span>到期时间：{{ paybasemsg_accountExpireTime }}</span>
                                    </div>
                                </div>
                                <div class="msgtable">
                                    <div class="table-list">
                                        <div class="tr">
                                            <div class="td">所属销售：</div>
                                            <div class="td td_content">{{ paybasemsg_saleName }}</div>
                                            <div class="td">发薪总额：</div>
                                            <div class="td td_content">￥{{ paybasemsg_patMoneyCount }}</div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">账户余额：</div>
                                            <div class="td td_content">￥{{ paybasemsg_payAccountBalance }}</div>
                                            <div class="td">支付宝账户余额：</div>
                                            <div class="td td_content flex justify-between">
                                                <div>￥{{ payBasicInfo.payAlipayAccountBalance }}</div>
                                                <div class="cursor-pointer text-primary" @click="onShowAlipayWithdraw">
                                                    提现
                                                </div>
                                            </div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">剩余月份：</div>
                                            <div class="td td_content">{{ paybasemsg_validTime }}</div>
                                            <div class="td">超级管理员：</div>
                                            <div class="td td_content">{{ paybasemsg_superParentName }}</div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">发薪席位：</div>
                                            <div class="td td_content">{{ hasSeat }}</div>
                                            <div class="td">手机号：</div>
                                            <div class="td td_content">{{ paybasemsg_phone }}</div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">客户充值账号：</div>
                                            <div class="td td_content maxcontent">{{ merchantBankCard }}</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="differenttitle">
                                    团队成员 <span>当前客户共有 <span class="blue">{{ hasSeat }}</span> 个发薪席位，目前还可分配 <span
                                    class="blue">{{
                                        hasSeat -
                                        useSeat
                                    }}</span> 个发薪席位</span>
                                </div>
                                <!-- 团队成员表格 -->
                                <div class="teametable">
                                    <el-input @input="changeteamfilter" v-model="teamserchText"
                                              placeholder="搜索成员姓名、手机号">
                                        <template #prefix>
                                            <el-icon class="el-input__icon">
                                                <search/>
                                            </el-icon>
                                        </template>
                                    </el-input>
                                    <el-table :data="teamtableData" border style="width: 100%;" height="300"
                                              :header-cell-style="{
                                            background: '#FAFAFC',
                                            color: '#202536',
                                        }">
                                        <el-table-column align="center" prop="userName" label="姓名"/>
                                        <el-table-column align="center" prop="phone" label="手机号">
                                            <template #default="scope">
                                                <div class="flex-center">
                                                    {{ scope.row.phone }}
                                                    <!-- {{
                                                        ('' +
                                                            scope.row.phone).replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') === 'null' ? '--' : ('' +
                                                            scope.row.phone).replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
                                                        }} -->
                                                    <el-icon size="16" color="#0256ff" @click="editPhone(scope.row)">
                                                        <Edit/>
                                                    </el-icon>
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" prop="position" label="职位"/>
                                        <el-table-column align="center" label="小程序角色">
                                            <template #default="scope">
                                                <span v-show="scope.row.isAdmin === 0">普通成员</span>
                                                <span v-show="scope.row.isAdmin === 1">管理员</span>
                                                <span v-show="scope.row.isAdmin === 2">超级管理员</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" label="pc端角色">
                                            <template #default="scope">
                                                <span v-show="scope.row.isPcAdmin === 0">普通成员</span>
                                                <span v-show="scope.row.isPcAdmin === 1">管理员</span>
                                                <span v-show="scope.row.isPcAdmin === 2">超级管理员</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" label="发薪席位">
                                            <template #default="scope">
                                                <span v-show="scope.row.isSeatAdmin === true">席位管理员</span>
                                                <span
                                                    v-show="scope.row.isSeatAdmin === false || scope.row.isSeatAdmin === null">--</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" label="操作" width="260">
                                            <template #default="scope">
                                                <div style="
                        display: flex;
                        align-items: center;
                        justify-content: space-around;
                      ">
                                                    <el-button link style="color: #0256ff"
                                                               @click="changeroleapizzc(scope.row)">修改角色
                                                    </el-button>
                                                    <el-dropdown>
                                                        <span style="color: #0256ff" class="el-dropdown-link">
                                                            重置密码
                                                        </span>
                                                        <template #dropdown>
                                                            <el-dropdown-menu>
                                                                <el-dropdown-item style="color: #0256ff"
                                                                                  @click="openresetpasswordzzc(scope.row)">
                                                                    重置小程序密码
                                                                </el-dropdown-item>
                                                                <el-dropdown-item style="color: #0256ff"
                                                                                  @click="openresetpasswordzzcpc(scope.row)">
                                                                    重置pc登录密码
                                                                </el-dropdown-item>
                                                            </el-dropdown-menu>
                                                        </template>
                                                    </el-dropdown>
                                                    <el-dropdown>
                                                        <span style="color: #0256ff" class="el-dropdown-link">
                                                            更多
                                                        </span>
                                                        <template #dropdown>
                                                            <el-dropdown-menu>
                                                                <!-- <el-dropdown-item style="color: #0256ff" v-if="scope.row.isOpen === 0"
                                  @click="openpczzc(scope.row)">开通PC</el-dropdown-item> -->
                                                                <el-dropdown-item style="color: #0256ff"
                                                                                  @click="okornologin(scope.row)">{{
                                                                        scope.row.status === 0
                                                                            ? "禁止登录"
                                                                            : "允许登录"
                                                                    }}
                                                                </el-dropdown-item>
                                                                <el-dropdown-item v-if="scope.row.isAdmin === 1"
                                                                                  style="color: #ee3737"
                                                                                  @click="setadmins(scope.row)">
                                                                    取消管理员
                                                                </el-dropdown-item>
                                                                <el-dropdown-item
                                                                    v-if="scope.row.isSeatAdmin === false || scope.row.isSeatAdmin === null"
                                                                    style="color: #0256ff"
                                                                    @click="setseatadmins(scope.row)">
                                                                    授权席位管理员
                                                                </el-dropdown-item>
                                                                <el-dropdown-item v-if="scope.row.isSeatAdmin === true"
                                                                                  style="color: #0256ff"
                                                                                  @click="closeseatadmins(scope.row)">
                                                                    取消席位管理员
                                                                </el-dropdown-item>
                                                                <el-dropdown-item v-if="scope.row.isAdmin === 0"
                                                                                  style="color: #0256ff"
                                                                                  @click="setadmins(scope.row)">
                                                                    设置管理员
                                                                </el-dropdown-item>
                                                                <el-dropdown-item v-if="scope.row.isAdmin === 1"
                                                                                  style="color: #0256ff"
                                                                                  @click="setorcanceladmin(scope.row)">
                                                                    设置超级管理员
                                                                </el-dropdown-item>
                                                            </el-dropdown-menu>
                                                        </template>
                                                    </el-dropdown>
                                                </div>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="paginationborder">
                                        <pagination :total="teamtotal" :currentPage="teamcurrentPage"
                                                    :pageSize="teampageSize" @SizeChange="teamhandleSizeChange"
                                                    @CurrentChange="teamhandleCurrentChange"></pagination>
                                    </div>
                                </div>
                                <div class="title">
                                    账户明细
                                </div>
                                <!-- 账户明细筛选条件 -->
                                <div class="accountradiobox flexvetweenbox">
                                    <div class="flexcenterbox">
                                        <div class="radiolable">产品筛选：</div>
                                        <el-radio-group style="margin-top: 16px" v-model="producttype"
                                                        @change="changeproducttype">
                                            <el-radio label="">全部</el-radio>
                                            <el-radio label="0">子弹发薪</el-radio>
                                            <el-radio label="2">日日保</el-radio>
                                            <el-radio label="3">长期保</el-radio>
                                            <el-radio label="1">电子签</el-radio>
                                            <el-radio label="7">群发消息</el-radio>
                                        </el-radio-group>
                                    </div>
                                    <el-button type="primary" class="my_btn" style="margin-bottom:-16px"
                                               @click="uploadzhmx">
                                        <img style="width: 16px;margin-right:5px;" src="../../assets/image/导出@2x.png"
                                             alt="">
                                        导出
                                    </el-button>
                                </div>
                                <div class="accountradiobox">
                                    <div class="radiolable">类型：</div>
                                    <el-radio-group style="margin-top: 16px" v-model="operatetype"
                                                    @change="changeoperatetype">
                                        <el-radio label="">全部</el-radio>
                                        <el-radio label="1">充值</el-radio>
                                        <el-radio label="0" v-if="showtbflag">投保
                                        </el-radio>
                                        <el-radio label="3">提现</el-radio>
                                        <el-radio label="5">余额转入</el-radio>
                                        <el-radio label="4">余额转出</el-radio>
                                    </el-radio-group>
                                </div>
                                <div class="accountradiobox" v-show="showpaymodeflag">
                                    <div class="radiolable">付款方式：</div>
                                    <el-radio-group style="margin-top: 16px" v-model="payfn" @change="getzhmxlist">
                                        <el-radio label="">全部</el-radio>
                                        <el-radio label="1">公对公付款</el-radio>
                                        <el-radio label="3">私对公付款</el-radio>
                                        <el-radio label="4">赠送</el-radio>
                                        <el-radio label="2">微信付款</el-radio>
                                    </el-radio-group>
                                </div>
                                <!-- 账户明细表格 -->
                                <div class="accounttable">
                                    <el-table :data="zhmxtableData" border style="width: 100%; margin-top: 16px"
                                              height="300" :header-cell-style="{
                                            background: '#FAFAFC',
                                            color: '#202536',
                                        }">
                                        <el-table-column align="center" prop="userName" label="产品">
                                            <template #default="scope">
                                                <div v-show="scope.row.productType === 0">子弹发薪</div>
                                                <div v-show="scope.row.productType === 2">日日保</div>
                                                <div v-show="scope.row.productType === 3">长期保</div>
                                                <div v-show="scope.row.productType === 1">电子签</div>
                                                <div v-show="scope.row.productType === 7">群发消息</div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" prop="operateAmount" label="操作金额"/>
                                        <el-table-column align="center" prop="createTime" label="操作时间"/>
                                        <el-table-column align="center" prop="remark" label="备注">
                                            <template #default="scope">
                                                <div class="flexcenterbox">
                                                    <el-tooltip class="box-item" effect="dark"
                                                                :content="scope.row.remark" placement="bottom">
                                                        <div style="
                            margin-right: 5px;
                            width: 80px;
                            white-space: nowrap;
                            overflow: hidden;
                            text-overflow: ellipsis;
                          ">
                                                            {{ scope.row.remark }}
                                                        </div>
                                                    </el-tooltip>
                                                    <el-tag v-show="scope.row.status === 1">已审核</el-tag>
                                                    <el-tag v-show="scope.row.status === 2" class="ml-2"
                                                            type="danger">已驳回
                                                    </el-tag>
                                                    <el-tag v-show="scope.row.status === 0" class="ml-2" type="info">待审核
                                                    </el-tag>
                                                    <el-tag v-show="scope.row.status === 3" class="ml-2" type="">已提现
                                                    </el-tag>
                                                    <el-tag v-show="scope.row.status === 4" class="ml-2"
                                                            type="success">已转出
                                                    </el-tag>
                                                    <el-tag v-show="scope.row.status === 5" class="ml-2"
                                                            type="warning">已转入
                                                    </el-tag>
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" prop="isOpen" label="充值凭证">
                                            <template #default="scope">
                                                <span
                                                    v-if="scope.row.voucherUrl !== '' || scope.row.voucherUrl !== null"
                                                    class="blue pointer"
                                                    @click="checkczpz(scope.row.voucherUrl)">点击查看</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column align="center" label="操作" width="260">
                                            <template #default="scope">
                                                <span class="blue pointer" @click="checkfksh(scope.row, 'check')"
                                                      v-if="scope.row.status === 0">付款审核</span>
                                                <span class="blue pointer" @click="checkfksh(scope.row, 'look')"
                                                      v-else>查看详情</span>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="paginationborder">
                                        <pagination :total="zahmxtotal" :currentPage="zhmxpagenum"
                                                    :pageSize="zhmxpagesize" @SizeChange="zhmxhandleSizeChange"
                                                    @CurrentChange="zhmxhandleCurrentChange"></pagination>
                                    </div>
                                </div>
                            </div>
                            <div :class="{ msgbox: true }">
                                <div class="border">
                                    <div class="top">
                                        <div class="product flexcenterbox">
                                            <div>子弹发薪</div>
                                            <div v-if="paybasemsg_isOpenPaySalary === 1" class="isornoopentag bullopen">
                                                已开通
                                            </div>
                                            <div v-else class="isornoopentag bullclose">未开通
                                            </div>
                                            <div v-show="paybasemsg_isOpenPaySalary === 1" class="opentime">{{
                                                    paybasemsg_payProductOpenTime
                                                }}开通
                                            </div>
                                        </div>
                                        <div class="recharge pointer" @click="bulletpayrechargeapipay">充值
                                        </div>
                                    </div>
                                    <div class="productform">
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>所属销售：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select filterable style="width: 100%;"
                                                           v-model="bulletform.paySaleid" placeholder="请选择销售"
                                                           @change="changezdfxxs">
                                                    <el-option v-for="item in allseller" :key="item.saleId"
                                                               :label="item.saleName" :value="item.saleId"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>&nbsp;&nbsp;公司简称：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input v-model="bulletform.gsjc" placeholder="请输入公司简称"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>&nbsp;营业执照编码：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input v-model="bulletform.yyzzbm" placeholder="请输入营业执照编码"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>&nbsp;法人姓名：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input v-model="bulletform.frxm" placeholder="请输入法人姓名"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>&nbsp;客户充值账号：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input v-model="bulletform.khhjhh" placeholder="请输入开户行及行号"/>
                                            </div>
                                        </div>

                                        <div class="formitem">
                                            <div class="lable">
                                                <span>营业执照地址：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input v-model="bulletform.yyzzaddress"
                                                          placeholder="请输入营业执照地址"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>&nbsp;&nbsp;所在区域：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input v-model="bulletform.address" placeholder="请输入地址"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>&nbsp;&nbsp;收款渠道：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="bulletform.payditch"
                                                           placeholder="请选择收款渠道" @change="changepayditch">
                                                    <el-option v-for="item in ditchoptions" :key="item.name"
                                                               :label="item.name" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>&nbsp;&nbsp;收款账号：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="bulletform.payadmin"
                                                           placeholder="请选择收款账号">
                                                    <el-option v-for="item in skzhlistzdfx" :key="item.id"
                                                               :label="item.bankName" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>开通账户：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select multiple style="width: 100%;" v-model="bulletform.payKtzh"
                                                           placeholder="请选择">
                                                    <el-option key="1" label="微信"
                                                               :disabled="paybasemsg_isOpenPaySalary"
                                                               value="1"/>
                                                    <el-option key="2" label="支付宝"
                                                               :disabled="paybasemsg_isOpenAlipay"
                                                               value="2"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div v-if="bulletform.payKtzh.includes('1')" class="wechatbox">
                                            <div class="tag tagwechat" v-if="paybasemsg_isOpenPaySalary">
                                                已开通
                                            </div>
                                            <div class="icontitle">
                                                <img class="icon" src="../../assets/image/wechaticon.png" alt="">
                                                <div class="text">微信账户</div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;商户号：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="bulletform.shh" placeholder="请输入商户号"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;单日额度：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="bulletform.dred" placeholder="请选择单日额度"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;单日可领额度：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="bulletform.drkled"
                                                              placeholder="请选择单日可领额度"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div v-if="bulletform.payKtzh.includes('2')" class="wechatbox">
                                            <div class="tag tagalipay" v-if="paybasemsg_isOpenAlipay">
                                                签约成功
                                            </div>
                                            <div class="icontitle">
                                                <img class="icon" src="../../assets/image/alipayicon.png" alt="">
                                                <div class="text">支付宝账户</div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;企业支付宝认证：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-button type="praimy"
                                                               v-if="!alipayRegisterStatus&&!paybasemsg_isOpenAlipay"
                                                               size="mini"
                                                               @click="OnGeneratingContractCode">生成签约码
                                                    </el-button>
                                                    <el-button type="praimy"
                                                               v-if="alipayRegisterStatus&&paybasemsg_isOpenAlipay"
                                                               size="mini"
                                                               @click="onBreakOffAnEngagement">解除授权
                                                    </el-button>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;单日额度：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="bulletform.dred" placeholder="请选择单日额度"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;单日可领额度：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="bulletform.drkled"
                                                              placeholder="请选择单日可领额度"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="flexcenterbox" style="margin-top:24px">
                                            <el-button class="my_btn" v-if="paybasemsg_isOpenPaySalary === 1"
                                                       type="primary" @click="surechangebull">确定修改
                                            </el-button>
                                            <el-button class="my_btn" v-else type="primary" @click="sureopenbullet">确定开通
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="长期保" name="2">
                        <div class="tabcontentbox">
                            <div class="tablebox">
                                <div class="title">
                                    基本信息
                                </div>
                                <div class="companyse_time">
                                    <div class="l" style="border-right: none;">
                                        <img src="../../assets/image/容器(1).png" alt=""/>
                                        <span>开通时间：{{ longbasemsg_productOpenTime }}</span>
                                    </div>
                                    <!-- <div class="r">
                    <img src="../../assets/image/容器(2).png" alt="" />
                    <span>到期时间：111111111</span>
                  </div> -->
                                </div>
                                <div class="msgtable">
                                    <div class="table-list">
                                        <div class="tr">
                                            <div class="td">所属销售：</div>
                                            <div class="td td_content">{{ longbasemsg_salesName }}</div>
                                            <div class="td">账户余额：</div>
                                            <div class="td td_content"
                                                 style="display:flex;align-items:center;justify-content:space-between">
                                                <span>￥{{ longbasemsg_wesureBalance }}</span><span class="blue pointer"
                                                                                                   @click="longtx">提现</span>
                                            </div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">理赔率：</div>
                                            <div class="td td_content"
                                                 style="display:flex;align-items:center;justify-content:space-between">
                                                <span>{{ longbasemsg_claimRate }}</span>
                                                <span class="blue pointer" @click="handleShowRate">查看</span>
                                            </div>
                                            <div class="td">总充值保费：</div>
                                            <div class="td td_content">￥{{ longbasemsg_totalRechargeAmount }}</div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">返利状态：</div>
                                            <div class="td td_content"
                                                 style="display:flex;align-items:center;justify-content:space-between">
                                                <span>{{
                                                        longbasemsg_openRebate === 0 ? '未返利' : '返利中'
                                                    }} </span><span
                                                class="blue pointer" @click="updateflstatus">设置</span>
                                            </div>
                                            <div class="td">可欠费额度：</div>
                                            <div class="td td_content"
                                                 style="display:flex;align-items:center;justify-content:space-between">
                                                <span v-if="!!longkqed === true">￥{{ longkqed }} </span>
                                                <span v-if="!!longkqed === false">--</span>
                                                <span class="blue pointer" @click="openkqfedtc">设置</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="btnbox">
                                    <div class="wbtn" @click="setadmin">账户设置
                                    </div>
                                    <div class="wbtn" @click="overage">超龄限制
                                    </div>
                                </div>
                                <div class="insurerecord">
                                    <div class="insurerecorditem">
                                        <div class="top_title">
                                            <div class="bord">保险方案</div>
                                            <div class="check" @click="lookinsuretypetcopen">查看
                                            </div>
                                        </div>
                                        <div class="bottom_info">
                                            <div class="infoitem">
                                                <div class="infolable">未失效</div>
                                                <div class="infomsg">{{ long_unexpiredPlanCount }}</div>
                                            </div>
                                            <div class="infoitem">
                                                <div class="infolable">已失效</div>
                                                <div class="infomsg">{{ long_expirePlanCount }}</div>
                                            </div>
                                            <div class="infoitem">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="insurerecorditem">
                                        <div class="top_title">
                                            <div class="bord">加减保记录</div>
                                            <div class="check" @click="addlonginsurehistorytcopen">查看
                                            </div>
                                        </div>
                                        <div class="bottom_info">
                                            <div class="infoitem">
                                                <div class="infolable">加保(次)</div>
                                                <div class="infomsg">{{ long_addInsur }}</div>
                                            </div>
                                            <div class="infoitem">
                                                <div class="infolable">减保(次)</div>
                                                <div class="infomsg">{{ long_reduceInsur }}</div>
                                            </div>
                                            <div class="infoitem">
                                                <div class="infolable">撤销(次)</div>
                                                <div class="infomsg">{{ long_revoke }}</div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="insurerecorditem">
                                        <div class="top_title">
                                            <div class="bord">一键续保</div>
                                            <div class="check" @click="onceaddinsuretcopen">查看
                                            </div>
                                        </div>
                                        <div class="bottom_info">
                                            <div class="infoitem">
                                                <div class="infolable">减保(次)</div>
                                                <div class="infomsg">{{ long_automaticReduceInsur }}</div>
                                            </div>
                                            <div class="infoitem">
                                                <div class="infolable"></div>
                                                <div class="infomsg">
                                                    <el-button class="my_btn" type="primary"
                                                               @click="onceaddinsuretcopen">一键续保
                                                    </el-button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="title">
                                    投保审核
                                </div>
                                <div class="accountinputbox">
                                    <div class="radiolable">派遣单位：</div>
                                    <el-input clearable @input="changelongdispatchingagency"
                                              v-model="longinsuretbshdispatchingagency" style="width: 300px;"
                                              placeholder="请输入派遣单位" :prefix-icon="Search"/>
                                </div>
                                <div class="accountradiobox">
                                    <div class="radiolable">保险状态：</div>
                                    <el-radio-group v-model="longinsuretbshcheckstatus" style="margin-top:16px"
                                                    @change="getlonginsurecompanylist">
                                        <el-radio label="" size="large">全部
                                        </el-radio>
                                        <el-radio label="0" size="large">待审核
                                        </el-radio>
                                        <el-radio label="1" size="large">已通过
                                        </el-radio>
                                        <el-radio label="2" size="large">已驳回
                                        </el-radio>
                                        <el-radio label="3" size="large">已拒保
                                        </el-radio>
                                    </el-radio-group>
                                </div>
                                <div class="insureChecktable">
                                    <el-table :data="longinsuretbshtableData" style="width: 100%;" height="300"
                                              :header-cell-style="{
                                            background: '#FAFAFC',
                                            color: '#202536',
                                        }">
                                        <el-table-column prop="serveCompanyName" label="派遣单位"/>
                                        <el-table-column prop="status" width="100" label="状态">
                                            <template #default="scope">
                                                <div v-show="scope.row.status === 0" class="taggray">待审核
                                                </div>
                                                <div v-show="scope.row.status === 1" class="tagblue">已通过
                                                </div>
                                                <div v-show="scope.row.status === 2" class="tagred">已驳回
                                                </div>
                                                <div v-show="scope.row.status === 3" class="tagyellow">已拒保
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column prop="roleName" label="工种">
                                            <template #default="scope">
                                                <div v-for="(ele, i) in scope.row.occupationList">{{ ele.name }}
                                                    （<span>{{ ele.level }}</span>）类
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column width="100" label="图片视频">
                                            <template #default="scope">
                                                <span v-show="scope.row.fileDetailList" class="blue pointer"
                                                      @click="looklongvidio(scope.row.fileDetailList)">点击查看</span>
                                                <span v-show="!scope.row.fileDetailList">--</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column prop="createTime" label="提交时间"/>
                                        <el-table-column prop="area" width="80" label="地区"/>
                                        <el-table-column label="操作" width="200">
                                            <template #default="scope">
                                                <div class="flexbox">
                                                    <div @click="longaddvideo(scope.row)"
                                                         v-show="scope.row.status === 0 || scope.row.status === 1 || scope.row.status === 3"
                                                         class="pointer blue" style="margin-right: 16px;">添加视频
                                                    </div>
                                                    <div @click="longserviceckeckok(scope.row)"
                                                         style="margin-right: 16px;" v-show="scope.row.status === 0"
                                                         class="pointer green">通过
                                                    </div>
                                                    <div @click="longserviceckeckno(scope.row)"
                                                         style="margin-right: 16px;" v-show="scope.row.status === 0"
                                                         class="pointer oriange">驳回
                                                    </div>
                                                    <!-- <div @click="longserviceckeckedit(scope.row)"
                                                        style="margin-right: 16px;" v-show="scope.row.status === 1"
                                                        class="pointer blue">编辑
                                                    </div> -->
                                                    <div @click="longserviceckeckreject(scope.row)"
                                                         style="margin-right: 16px;" v-show="scope.row.status === 1"
                                                         class="pointer blue">拒保
                                                    </div>
                                                    <div @click="longserviceckeckrejectback(scope.row)"
                                                         style="margin-right: 16px;" v-show="scope.row.status === 3"
                                                         class="pointer blue">取消拒保
                                                    </div>
                                                </div>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="paginationborder">
                                        <pagination :total="longinsuretbshtotal" :currentPage="longinsuretbshpageNum"
                                                    :pageSize="longinsuretbshpageSize"
                                                    @SizeChange="changelonginsuretbshpageSize"
                                                    @CurrentChange="changelonginsuretbshpageNum"></pagination>
                                    </div>
                                </div>
                                <div class="title">
                                    投保人员
                                </div>
                                <div class="insureCheckform">
                                    <div class="formtop">
                                        <div class="formtopleft">
                                            <div class="blueblock"></div>
                                            <div class="insuretype">筛选条件</div>
                                        </div>
                                        <div class="formtoputils">
                                            <!-- <div class="utilitem">配置</div> -->
                                            <div class="utilitem" @click="clearlonginsuretbryform">
                                                <img src="../../assets/image/容器.png" alt="">
                                                <span>清空</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="formfirst">
                                        <el-form-item label="派遣单位：">
                                            <el-input @input="changelonginsuretbrypqdw" v-model="longinsuretbrypqdw"
                                                      placeholder="请输入派遣单位" style="width: 200px;"/>
                                        </el-form-item>
                                        <div class="spread" @click="spread" v-show="spreadflag === true">展开
                                        </div>
                                    </div>
                                    <div class="form" v-show="spreadflag === false">
                                        <el-form-item label="保司名称："
                                                      style="margin-top:-10px;display:flex;align-items:center;position: relative;"
                                                      @change="changelonginsurebs">
                                            <span class='red poa'>*</span>
                                            <el-radio-group v-model="longinsuretbrybsmc" class="ml-4">
                                                <el-radio :label="ele.dictValue" size="large"
                                                          v-for="(ele, index) in longinsurebslist" :key="index">{{
                                                        ele.dictLabel
                                                    }}
                                                </el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        <el-form-item label="保司方案："
                                                      style="margin-top:-10px;display:flex;align-items:center;">
                                            <el-radio-group @change="getbuyinsurepeoplelist"
                                                            v-model="longinsuretbrybsfa" class="ml-4">
                                                <el-radio :label="ele" size="large"
                                                          v-for="(ele, index) in longinsurebsfa" :key="index">{{
                                                        ele
                                                    }}
                                                </el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        <el-form-item label="客户风险等级："
                                                      style="margin-top:-10px;display:flex;align-items:center;">
                                            <el-radio-group @change="getbuyinsurepeoplelist"
                                                            v-model="longinsuretbrykhfxdj" class="ml-4">
                                                <el-radio :label="1" size="large">1类
                                                </el-radio>
                                                <el-radio :label="2" size="large">2类
                                                </el-radio>
                                                <el-radio :label="3" size="large">3类
                                                </el-radio>
                                                <el-radio :label="4" size="large">4类
                                                </el-radio>
                                                <el-radio :label="5" size="large">5类
                                                </el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        <el-form-item label="保司风险等级："
                                                      style="margin-top:-10px;display:flex;align-items:center;">
                                            <el-radio-group @change="getbuyinsurepeoplelist"
                                                            v-model="longinsuretbrybsfxdj" class="ml-4">
                                                <el-radio :label="1" size="large">1类
                                                </el-radio>
                                                <el-radio :label="2" size="large">2类
                                                </el-radio>
                                                <el-radio :label="3" size="large">3类
                                                </el-radio>
                                                <el-radio :label="4" size="large">4类
                                                </el-radio>
                                                <el-radio :label="5" size="large">5类
                                                </el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        <el-form-item label="月单模式："
                                                      style="margin-top:-10px;display:flex;align-items:center;">
                                            <el-radio-group @change="getbuyinsurepeoplelist"
                                                            v-model="longinsuretbryydms" class="ml-4">
                                                <el-radio label="0" size="large">灵活
                                                </el-radio>
                                                <el-radio label="1" size="large">月单
                                                </el-radio>
                                                <el-radio label="2" size="large">即时
                                                </el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        <el-form-item label="保险状态："
                                                      style="margin-top:-10px;display:flex;align-items:center;">
                                            <el-radio-group @change="getbuyinsurepeoplelist"
                                                            v-model="longinsuretbrybxzt" class="ml-4">
                                                <el-radio label="0" size="large">待生效
                                                </el-radio>
                                                <el-radio label="1" size="large">在保
                                                </el-radio>
                                                <el-radio label="2" size="large">已失效
                                                </el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        <el-form-item style="margin-top:-10px;display:flex;align-items:center;">
                                            <div class="blockbox">
                                                <div class="flexcenterbox insureCheckformlable">
                                                    <span style="min-width:90px;">投保人姓名：</span>
                                                    <el-input @input="changelonginsuretbryname"
                                                              v-model="longinsuretbryname"
                                                              placeholder="请输入投保人姓名"/>
                                                </div>
                                                <div class="flexcenterbox insureCheckformlable">
                                                    <span style="min-width:90px;">身份证号：</span>
                                                    <el-input @input="changelonginsuretbryid" v-model="longinsuretbryid"
                                                              placeholder="请输入身份证号"/>
                                                </div>
                                            </div>
                                        </el-form-item>
                                        <el-form-item label="导出时间："
                                                      style="margin-top:-5px;display:flex;align-items:center;position: relative;">
                                            <span class='red poa'>*</span>
                                            <div class="demo-date-picker">
                                                <div class="block">
                                                    <el-date-picker v-model="longinsuretbrydcsj" :clearable=false
                                                                    value-format="YYYY-MM-DD" type="daterange"
                                                                    start-placeholder="开始时间"
                                                                    end-placeholder="结束时间"/>
                                                </div>
                                            </div>
                                        </el-form-item>
                                        <el-form-item style="margin-top:-10px;display:flex;align-items:center;">
                                            <div class="blockbox">
                                                <div class="block">
                                                    <span class="insureCheckformlable">开始时间：</span>
                                                    <el-date-picker @change="getbuyinsurepeoplelist"
                                                                    v-model="longinsuretbrykssj" type="date"
                                                                    placeholder="请选择开始时间"
                                                                    value-format="YYYY-MM-DD"/>
                                                </div>
                                                <div class="block">
                                                    <span class="insureCheckformlable">结束时间：</span>
                                                    <el-date-picker @change="getbuyinsurepeoplelist"
                                                                    v-model="longinsuretbryjssj" type="date"
                                                                    placeholder="请选择结束时间"
                                                                    value-format="YYYY-MM-DD"/>
                                                </div>
                                            </div>
                                        </el-form-item>
                                        <div class="packup" @click="packup" v-show="spreadflag == false">收起
                                        </div>
                                    </div>
                                </div>
                                <div class="border_linebox">
                                    <div class="border_line"></div>
                                </div>
                                <div class="btnbox">
                                    <div class="bbtn" @click="staffrecordexport">导出列表
                                    </div>
                                    <el-popover placement="bottom-end" :width="100" trigger="click">
                                        <template #reference>
                                            <div class="wbtn">导出在保证明</div>
                                        </template>
                                        <div class="flexcenterbox pointer uploadstyle"
                                             @click="inwarrantyprovedexportpdf">PDF
                                        </div>
                                        <div class="flexcenterbox pointer uploadstyle" @click="inwarrantyprovedexport">
                                            EX
                                        </div>
                                    </el-popover>
                                    <div class="wbtn" @click="inwarrantystaffexport">导出在保证明人员
                                    </div>
                                </div>
                                <div class="insureChecktable">
                                    <el-table :data="longinsuretbrylist" style="width: 100%;" height="500"
                                              :header-cell-style="{
                                            background: '#FAFAFC',
                                            color: '#202536',
                                        }">
                                        <el-table-column width="200" fixed label="投保人">
                                            <template #default="scope">
                                                <div class="flexbox">
                                                    <div v-show="scope.row.policyStatus === 0"
                                                         class="longinsuretbrygreen">待生效
                                                    </div>
                                                    <div v-show="scope.row.policyStatus === 1"
                                                         class="longinsuretbryblue">在保
                                                    </div>
                                                    <div v-show="scope.row.policyStatus === 2"
                                                         class="longinsuretbryred">已失效
                                                    </div>
                                                    <div v-show="scope.row.isGodWorker === 1" class="blacktag">大神
                                                    </div>
                                                    <span>{{ scope.row.userName }}</span>
                                                </div>
                                                <div>{{ scope.row.idCardNo }}</div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column width="200" prop="serveCompanyName" label="派遣单位"/>
                                        <el-table-column width="100" prop="companyPlanName" label="方案名称"/>
                                        <el-table-column width="200" prop="occupationName" label="工种"/>
                                        <el-table-column width="100" prop="price" label="单价"/>
                                        <el-table-column width="100" prop="isMonthMode" label="模式">
                                            <template #default="scope">
                                                <span v-show="scope.row.isMonthMode === 0">灵活保单</span>
                                                <span v-show="scope.row.isMonthMode === 1">月单</span>
                                                <span v-show="scope.row.isMonthMode === 2">即时生效</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column prop="occupationLevel" label="工种等级"/>
                                        <el-table-column width="200" prop="occupationOriginName" label="实际工种名称"/>
                                        <el-table-column width="130" prop="occupationOriginLevel" label="实际工种等级"/>
                                        <el-table-column width="100" prop="code" label="工种编码"/>
                                        <!-- <el-table-column prop="occupationOriginName" label="日保日期" /> -->
                                        <el-table-column width="200" prop="createTime" label="创建时间"/>
                                        <el-table-column width="200" prop="insurStartTime" label="生效时间">
                                            <template #default="scope">
                                                <span>{{
                                                        scope.row.insurStartTime ? scope.row.insurStartTime : '--'
                                                    }}</span>
                                            </template>
                                        </el-table-column>
                                        <el-table-column width="200" prop="insurEndTime" label="结束时间">
                                            <template
                                                #default="scope">
                                                <span>{{
                                                        scope.row.insurEndTime ? scope.row.insurEndTime : '--'
                                                    }}</span>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="paginationborder">
                                        <pagination :total="longinsuretbrytotal" :currentPage="longinsuretbrypageNum"
                                                    :pageSize="longinsuretbrypageSize"
                                                    @SizeChange="changelonginsuretbrypageSize"
                                                    @CurrentChange="changelonginsuretbrypageNum"></pagination>
                                    </div>
                                </div>
                            </div>
                            <div :class="{ msgbox: true }">
                                <div class="border">
                                    <div class="top">
                                        <div class="product flexcenterbox">
                                            <div>长期保</div>
                                            <div v-if="longinsureopenorno === 1" class="isornoopentag bullopen">已开通
                                            </div>
                                            <div v-else class="isornoopentag bullclose">未开通
                                            </div>
                                            <div v-show="longinsureopenorno === 1" class="opentime">{{
                                                    longinsureopentime
                                                }}开通
                                            </div>
                                        </div>
                                        <div class="recharge pointer" @click="longpay">充值
                                        </div>
                                    </div>
                                    <div class="productform">
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red mr-10px">*</span><span>保险公司：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select v-model="longform.bxcompany" multiple filterable allow-create
                                                           default-first-option :reserve-keyword="false"
                                                           placeholder="请选择保险公司"
                                                           @change="changelongtimecompany">
                                                    <el-option
                                                        :disabled="longform.disabledbxcompany.includes(item.dictValue)"
                                                        v-for="item in longinsurebslist" :key="item.dictValue"
                                                        :label="item.dictLabel" :value="item.dictValue"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red mr-10px">*</span><span>投保方案：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select v-model="longform.bxtype" multiple filterable allow-create
                                                           default-first-option :reserve-keyword="false"
                                                           placeholder="请选择投保方案">
                                                    <el-option
                                                        :disabled="longform.disabledbxtype.includes(item.dictValue)"
                                                        v-for="item in longbxtype" :key="item.dictValue"
                                                        :label="item.dictLabel" :value="item.dictValue"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>快捷投保：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select filterable style="width: 100%;" v-model="longform.kjtb"
                                                           placeholder="请选择">
                                                    <el-option :key="1" label="开启" :value="1"/>
                                                    <el-option key="2" label="关闭" :value="2"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red mr-10px">*</span><span>所属销售：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select filterable style="width: 100%;" v-model="longform.paySaleid"
                                                           placeholder="请选择销售" @change="changelongxs">
                                                    <el-option v-for="item in allseller" :key="item.saleId"
                                                               :label="item.saleName" :value="item.saleId"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>&nbsp;&nbsp;所属行业：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="longform.industry"
                                                           placeholder="请选择所属行业">
                                                    <el-option v-for="item in industrylist" :key="item.dictLabel"
                                                               :label="item.dictLabel" :value="item.dictValue"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red mr-10px">*</span><span>收款渠道：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="longform.payditch"
                                                           placeholder="请选择收款渠道" @change="changelongditch">
                                                    <el-option v-for="item in ditchoptions" :key="item.name"
                                                               :label="item.name" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red mr-10px">*</span><span>收款账号：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="longform.payadmin"
                                                           placeholder="请选择收款账号">
                                                    <el-option v-for="item in skzhlistlong" :key="item.id"
                                                               :label="item.bankName" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem !items-start">
                                            <div class="lable">
                                                <span class="red mr-10px">*</span><span>营业执照：</span>
                                            </div>
                                            <div class="lableform">
                                                <uploadImage ref="uploadImageRef"
                                                             v-model:image-url="longform.creditCodePicture"/>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form">
                                        <div class="flexcenterbox">
                                            <el-button class="my_btn"
                                                       v-show="longinsureopenorno === 0 || longinsureopenorno === null"
                                                       type="primary" @click="suresetlong">确定开通
                                            </el-button>
                                            <el-button class="my_btn" v-show="longinsureopenorno === 1"
                                                       @click="surechangelong" type="primary">确定修改
                                            </el-button>
                                            <!-- <el-button class="my_btn" v-show="longinsureopenorno === 1" @click="surechangelong"
                        type="primary">确定修改</el-button> -->
                                        </div>
                                    </div>
                                </div>
                                <div class="border">
                                    <div class="top">
                                        <div class="product">发票详情</div>
                                        <div class="recharge pointer" @click="allinvoicelisttcopen">全部
                                        </div>
                                    </div>
                                    <div class="productform">
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>月份：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-date-picker :disabled-date="disabledinvoiceDate"
                                                                @change="changeinvoiceDate" v-model="invoiceDate"
                                                                type="month"
                                                                value-format="YYYY-MM" placeholder="选择月份"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>发票类型：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                {{ noinvoiceflag ? '--' : '长期保' }}
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>发票状态：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                <div v-show="noinvoiceflag">--</div>
                                                <div v-show="noinvoiceflag === false && invoicestatus === 0">未申请
                                                </div>
                                                <div v-show="noinvoiceflag === false && invoicestatus === 1">已申请<span
                                                    style="margin-left:5px;" class="pointer blue"
                                                    v-show="invoicecheckstatus === 1 && invoiceUrl != null"
                                                    @click="lookinvoice">查看</span></div>
                                                <div v-show="noinvoiceflag === false && invoicestatus === 2">已上传<span
                                                    style="margin-left:5px;" class="pointer blue"
                                                    @click="lookinvoice">查看</span></div>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>核对状态：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                <div v-show="noinvoiceflag">--</div>
                                                <div v-show="noinvoiceflag === false && invoicecheckstatus === 0">正常
                                                </div>
                                                <div v-show="noinvoiceflag === false && invoicecheckstatus === 1">异常
                                                </div>
                                                <div v-show="noinvoiceflag === false && invoicecheckstatus === 2">待核对
                                                </div>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>发票金额：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                {{ noinvoiceflag ? '--' : invoicesprice }}
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>申请时间：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                {{ noinvoiceflag ? '--' : invoicesapplyTime }}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form">
                                        <div class="flexcenterbox">
                                            <el-button v-show="noinvoiceflag === false || invoicestatus != 0"
                                                       class="my_btn" type="primary" @click="exportlongfp">导出
                                            </el-button>
                                            <el-button v-show="noinvoiceflag === false || invoicestatus != 0"
                                                       class="my_cancelbtn" @click="opuploadfptc">上传发票
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="日日保" name="3">
                        <div class="tabcontentbox">
                            <div class="tablebox">
                                <div class="title">
                                    基本信息
                                </div>
                                <!-- <div class="companyse_time">
                                    <div class="l" style="border:none;">
                                        <img src="../../assets/image/容器(1).png" alt="" />
                                        <span>开通时间：{{ dayinsureopentime }}</span>
                                    </div>
                                </div> -->
                                <div class="msgtable">
                                    <div class="table-list">
                                        <div class="tr">
                                            <div class="td">所属销售：</div>
                                            <div class="td td_content">{{ dayinsureosalename }}</div>
                                            <div class="td">账户余额：</div>
                                            <div class="td td_content flexbetweenbox">
                                                <span>￥{{ dayinsurezhye }}</span>
                                                <span class="blue pointer" @click='daytx'>提现</span>
                                            </div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">保司：</div>
                                            <div class="td td_content">{{ dayinsureCompanyName }}</div>
                                            <div class="td">账户状态：</div>
                                            <div class="td td_content">
                                                <span v-show="dayinsureblockedAccount === 0">未冻结</span>
                                                <span v-show="dayinsureblockedAccount === 1">冻结</span>
                                                <span v-show="dayinsureblockedAccount === 2">30天未投保自动冻结</span>
                                            </div>
                                        </div>
                                        <div class="tr">
                                            <div class="td">理赔率：</div>
                                            <div class="td td_content flexvetweenbox"><span>{{
                                                    datinsureClaimRate
                                                }}</span><span class="maincolor pointer"
                                                               @click="handleShowRate">查看</span></div>
                                            <div class="td">费率：</div>
                                            <div class="td td_content">{{ dayinsureIncreaseRate * 100 }}%</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="btnbox border_none">
                                    <div class="wbtn" @click="longsetadmintcopen">账户设置
                                    </div>
                                </div>
                                <div class="title" v-if="InsurComCompanyPlansDailyList?.length !== 0">
                                    保险方案
                                </div>
                                <div class="msgtable" v-if="InsurComCompanyPlansDailyList?.length !== 0">
                                    <div class="table-list">
                                        <div class="tr" v-for="(item, i) in InsurComCompanyPlansDailyList" :key="i">
                                            <div class="td">开通时间：</div>
                                            <div class="td td_content">{{ dayinsureopentime }}</div>
                                            <div class="td">{{ item.planName }}单价：</div>
                                            <div class="td td_content flexbetweenbox">
                                                <span v-if="!item.showEditDayInsurePriceFlag">￥{{ item.price }}</span>
                                                <el-input v-if="item.showEditDayInsurePriceFlag" v-model="item.price"
                                                          style="width: 100px" placeholder="请输入价格"/>
                                                <span v-if="item.showEditDayInsurePriceFlag" class="blue pointer"
                                                      @click='onSureChangePriceOfDayInsure(item.price, item.id)'>确定</span>
                                                <span v-if="item.showEditDayInsurePriceFlag" class="blue pointer"
                                                      @click='getInsurComCompanyPlansDailyList'>取消</span>
                                                <span v-if="!item.showEditDayInsurePriceFlag" class="blue pointer"
                                                      @click='onShowEditDayInsurePriceFlag(i)'>编辑</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="title">
                                    投保审批
                                </div>
                                <div class="accountinputbox">
                                    <div class="radiolable">派遣单位：</div>
                                    <el-input placeholder="请输入派遣单位" style="width: 300px;"
                                              v-model="daydispatchingagency"
                                              clearable @input="changedaydispatchingagency"></el-input>
                                </div>
                                <div class="accountradiobox">
                                    <div class="radiolable">保险状态：</div>
                                    <el-radio-group style="margin-top: 16px" v-model="daycheckstatus"
                                                    @change="getdayinsurecompanylist">
                                        <el-radio label="" size="large">全部
                                        </el-radio>
                                        <el-radio label="3" size="large">待审核
                                        </el-radio>
                                        <el-radio label="1" size="large">已通过
                                        </el-radio>
                                        <el-radio label="2" size="large">已驳回
                                        </el-radio>
                                    </el-radio-group>
                                </div>
                                <div class="accounttable">
                                    <div class="tableborder" style="border:1px solid #EAEAEF;border-bottom:none">
                                        <el-table :data="daytableData" style="width: 100%; margin-top: 0" height="450"
                                                  :header-cell-style="{
                                                background: '#FAFAFC',
                                                color: '#202536',
                                            }">
                                            <el-table-column prop="serveCompanyName" width="200" label="派遣单位"/>
                                            <el-table-column prop="auditStatus" label="审批状态">
                                                <template #default="scope">
                                                    <div v-show="scope.row.auditStatus === 3" class="taggray">待审批
                                                    </div>
                                                    <div v-show="scope.row.auditStatus === 1" class="tagblue">已开启
                                                    </div>
                                                    <div v-show="scope.row.auditStatus === 2" class="tagred">已驳回
                                                    </div>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="contacts" label="负责人"/>
                                            <el-table-column prop="phone" label="手机号"/>
                                            <el-table-column label="图片视频">
                                                <template #default="scope">
                                                    <span v-show="scope.row.params.file"
                                                          @click="lookdayvidio(scope.row.params.file)"
                                                          class="blue pointer">点击查看</span>
                                                    <span v-show="!scope.row.params.file">--</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="wesureInfo.industryName" label="行业名称"/>
                                            <el-table-column prop="area" label="地区"/>
                                            <el-table-column label="操作" width="180">
                                                <template #default="scope">
                                                    <div class="flexvetweenbox">
                                                        <div class="blue pointer"
                                                             v-show="scope.row.auditStatus === 3 || scope.row.auditStatus === 1"
                                                             style="border-right: 1px solid #F4F4F7;padding-right: 10px;box-sizing: border-box;"
                                                             @click="changedayhy(scope.row)">
                                                            修改行业
                                                        </div>
                                                        <div v-show="scope.row.auditStatus === 3" class="green pointer"
                                                             @click="daycheckok(scope.row)">通过
                                                        </div>
                                                        <div v-show="scope.row.auditStatus === 3"
                                                             class="oriange pointer" @click="daycheckno(scope.row)">驳回
                                                        </div>
                                                    </div>
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                    <div class="paginationborder">
                                        <pagination :total="daytotal" :currentPage="daycurrentPage"
                                                    :pageSize="daypageSize" @SizeChange="dayhandleSizeChange"
                                                    @CurrentChange="dayhandleCurrentChange"></pagination>
                                    </div>
                                </div>
                                <div class="title">
                                    投保记录
                                </div>
                                <div class="flexvetweenbox" style="padding-right:12px;">
                                    <div class="accountinputbox">
                                        <div class="radiolable">投保时间：</div>
                                        <div style="width:400px;">
                                            <el-date-picker v-model="dayinsuretbjldate"
                                                            @change="changedayinsuretbjldate" type="daterange"
                                                            start-placeholder="开始时间" end-placeholder="结束时间"
                                                            range-separator="至"
                                                            value-format="YYYY-MM-DD"></el-date-picker>
                                        </div>
                                    </div>
                                    <div>
                                        <el-button type="primary" size="default" class="my_btn" @click="exportdaytbjl">
                                            <el-icon>
                                                <Upload/>
                                            </el-icon>
                                            导出列表
                                        </el-button>
                                    </div>
                                </div>
                                <div class="insureChecktable" style="margin-top:16px;">
                                    <el-table :data="dayinsuretbjltabledate" height="450"
                                              style="width: 100%; margin-top: 0" :header-cell-style="{
                                            background: '#FAFAFC',
                                            color: '#202536',
                                        }">
                                        <el-table-column prop="serveCompanyName" label="派遣单位  "/>
                                        <el-table-column prop="comboName" label="方案名称"/>
                                        <el-table-column prop="insurePeoples" label="投保人数"/>
                                        <el-table-column prop="insureDay" label="投保日期">
                                        </el-table-column>
                                        <el-table-column prop="amount" label="金额"/>
                                        <el-table-column prop="increaseRate" label="费率">
                                            <template #default="scope">
                                                {{ scope.row.increaseRate * 100 }}%
                                            </template>
                                        </el-table-column>
                                        <el-table-column label="操作">
                                            <template #default="scope">
                                                <div class="blue flexbox">
                                                    <div class="pointer"
                                                         @click="dayinsureexportone(scope.row.projectId)"
                                                         style="margin-right:8px;padding-right:8px;border-right:1px solid #F4F4F7">
                                                        导出
                                                    </div>
                                                    <div class="pointer" @click="dayinsuredetail(scope.row)">查看详情
                                                    </div>
                                                </div>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="paginationborder">
                                        <pagination :total="dayinsuretbjltotal" :currentPage="dayinsuretbjlpagenum"
                                                    :pageSize="dayinsuretbjlpagesize"
                                                    @SizeChange="changedayinsuretbjlpagesize"
                                                    @CurrentChange="changedayinsuretbjlpagenum"></pagination>
                                    </div>
                                </div>
                            </div>
                            <div :class="{ msgbox: true }">
                                <div class="border">
                                    <div class="top">
                                        <div class="product flexcenterbox">
                                            <div>日日保</div>
                                            <div v-if="isopendayinsure === 1" class="isornoopentag bullopen">已开通
                                            </div>
                                            <div v-else class="isornoopentag bullclose">未开通
                                            </div>
                                            <div v-show="isopendayinsure === 1" class="opentime">{{
                                                    dayinsureopentime
                                                }}开通
                                            </div>
                                        </div>
                                        <div class="recharge pointer" @click="everypay">充值
                                        </div>
                                    </div>
                                    <div class="productform">
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>保险公司：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select v-model="everyform.bxcompany" :multiple="false" filterable
                                                           allow-create default-first-option :reserve-keyword="false"
                                                           placeholder="请选择保险公司" @change="changeeverybxcompany">
                                                    <el-option v-for="item in dailybxcompany" :key="item.dictValue"
                                                               :label="item.dictLabel" :value="item.dictValue"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>投保方案：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select v-model="everyform.bxtype" multiple filterable allow-create
                                                           default-first-option :reserve-keyword="false"
                                                           placeholder="请选择投保方案">
                                                    <el-option v-for="item in everybxtype" :key="item.dictValue"
                                                               :label="item.dictLabel" :value="item.dictValue"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>所属销售：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select filterable style="width: 100%;" v-model="everyform.paySaleid"
                                                           placeholder="请选择销售" @change="changedayxs">
                                                    <el-option v-for="item in allseller" :key="item.saleId"
                                                               :label="item.saleName" :value="item.saleId"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>&nbsp;&nbsp;收款渠道：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="everyform.payditch"
                                                           placeholder="请选择收款渠道" @change="changeeveryditch">
                                                    <el-option v-for="item in ditchoptions" :key="item.name"
                                                               :label="item.name" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>&nbsp;&nbsp;收款账号：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="everyform.payadmin"
                                                           placeholder="请选择收款账号">
                                                    <el-option v-for="item in skzhlistday" :key="item.id"
                                                               :label="item.bankName" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form">
                                        <div class="flexcenterbox">
                                            <el-button class="my_btn" v-show="isopendayinsure === 0"
                                                       @click="suresubmitdaymsg" type="primary">确定开通
                                            </el-button>
                                            <el-button class="my_btn" v-show="isopendayinsure === 1"
                                                       @click="surechangedaymsg" type="primary">确定修改
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                                <div class="border">
                                    <div class="top">
                                        <div class="product">发票详情</div>
                                        <div class="recharge pointer" @click="allinvoicelisttcopen">全部
                                        </div>
                                    </div>
                                    <div class="productform">
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>月份：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-date-picker :disabled-date="disabledinvoiceDate"
                                                                @change="daychangeinvoiceDate" v-model="dayinvoiceDate"
                                                                type="month"
                                                                value-format="YYYY-MM" placeholder="选择月份"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>发票类型：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                {{ noinvoiceflag ? '--' : '日日保' }}
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>发票状态：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                <div v-show="noinvoiceflag">--</div>
                                                <div v-show="noinvoiceflag === false && invoicestatus === 0">未申请
                                                </div>
                                                <div v-show="noinvoiceflag === false && invoicestatus === 1">已申请<span
                                                    style="margin-left:5px;" class="pointer blue"
                                                    v-show="invoicecheckstatus === 1 && invoiceUrl != null"
                                                    @click="lookdayinvoice">查看</span></div>
                                                <div v-show="noinvoiceflag === false && invoicestatus === 2">已上传<span
                                                    style="margin-left:5px;" class="pointer blue"
                                                    @click="lookdayinvoice">查看</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>核对状态：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                <div v-show="noinvoiceflag">--</div>
                                                <div v-show="noinvoiceflag === false && invoicecheckstatus === 0">正常
                                                </div>
                                                <div v-show="noinvoiceflag === false && invoicecheckstatus === 1">异常
                                                </div>
                                                <div v-show="noinvoiceflag === false && invoicecheckstatus === 2">待核对
                                                </div>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>发票金额：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                {{ noinvoiceflag ? '--' : invoicesprice }}
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span>申请时间：</span>
                                            </div>
                                            <div class="lableform" style="color:#565868;font-size:14px">
                                                {{ noinvoiceflag ? '--' : invoicesapplyTime }}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form">
                                        <div class="flexcenterbox">
                                            <el-button v-show="noinvoiceflag === false || invoicestatus != 0"
                                                       class="my_btn" type="primary" @click="dayexportlongfp">导出
                                            </el-button>
                                            <el-button v-show="noinvoiceflag === false || invoicestatus != 0"
                                                       class="my_cancelbtn" @click="dayopuploadfptc">上传发票
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="团意日保" name="4">
                        <div class="tabcontentbox">
                            <div class="tablebox">
                                <div class="title">
                                    基本信息
                                </div>
                                <div class="companyse_time">
                                    <div class="l" style="border-right:none">
                                        <img src="../../assets/image/容器(1).png" alt=""/>
                                        <span>开通时间：{{ tyrbopentime }}</span>
                                    </div>
                                    <!-- <div class="r">
                    <img src="../../assets/image/容器(2).png" alt="" />
                    <span>到期时间：111111111</span>
                  </div> -->
                                </div>
                                <div class="msgtable">
                                    <div class="table-list">
                                        <div class="tr">
                                            <div class="td">所属销售：</div>
                                            <div class="td td_content">{{ tyrbsalename }}</div>
                                            <div class="td">账户余额：</div>
                                            <div class="td td_content">￥{{ tyrbzhye }}</div>
                                        </div>
                                        <!-- <div class="tr">
                      <div class="td">保司：</div>
                      <div class="td td_content">国寿财</div>
                      <div class="td">账户状态：</div>
                      <div class="td td_content">冻结</div>
                    </div>
                    <div class="tr">
                      <div class="td">理赔率：</div>
                      <div class="td td_content flexvetweenbox"><span>111</span><span class="maincolor">查看</span></div>
                      <div class="td">费率：</div>
                      <div class="td td_content">1%</div>
                    </div> -->
                                    </div>
                                </div>
                                <!-- <div class="btnbox border_none">
                  <div class="wbtn">账户设置</div>
                </div> -->
                                <div class="title">
                                    派遣单位
                                </div>
                                <div class="accountinputbox">
                                    <div class="radiolable">派遣单位：</div>
                                    <el-input placeholder="请输入派遣单位" style="width: 300px;"
                                              v-model="teamdispatchingagency" clearable
                                              @input="changeteamdispatchingagency"></el-input>
                                </div>
                                <div class="accountradiobox">
                                    <div class="radiolable">保险状态：</div>
                                    <el-radio-group style="margin-top: 16px" v-model="teamcheckstatus"
                                                    @change="getteaminsurecompanylist">
                                        <el-radio label="" size="large">全部
                                        </el-radio>
                                        <el-radio label="3" size="large">待审核
                                        </el-radio>
                                        <el-radio label="1" size="large">已通过
                                        </el-radio>
                                        <el-radio label="2" size="large">已驳回
                                        </el-radio>
                                    </el-radio-group>
                                </div>
                                <div class="accounttable">
                                    <div class="tableborder" style="border:1px solid #EAEAEF;border-bottom:none">
                                        <el-table :data="teampqdwtableData" height="450"
                                                  style="width: 100%; margin-top: 16px" :header-cell-style="{
                                                background: '#FAFAFC',
                                                color: '#202536',
                                            }">
                                            <el-table-column prop="companyName" label="客户名"/>
                                            <el-table-column prop="serveCompanyName" label="派遣单位"/>
                                            <el-table-column prop="auditStatus" label="审批状态">
                                                <template #default="scope">
                                                    <span v-show="scope.row.auditStatus === 3"
                                                          class="gray">待审批</span>
                                                    <span v-show="scope.row.auditStatus === 1"
                                                          class="blue">已通过</span>
                                                    <span v-show="scope.row.auditStatus === 2" class="red">已驳回</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="contacts" label="负责人"/>
                                            <el-table-column prop="phone" label="手机号"/>
                                            <el-table-column label="图片视频">
                                                <template #default="scope">
                                                    <span v-show="scope.row.params.file"
                                                          @click="lookdayvidio(scope.row.params.file)"
                                                          class="blue pointer">点击查看</span>
                                                    <span
                                                        v-show="!scope.row.params.file || scope.row.params.file.length === 0">--</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="wesureInfo.industryName" label="行业名称"/>
                                            <el-table-column prop="area" label="地区"/>
                                        </el-table>
                                    </div>
                                    <div class="paginationborder">
                                        <pagination :total="teampqdwtotal" :currentPage="teampqdwcurrentPage"
                                                    :pageSize="teampqdwpageSize" @SizeChange="teampqdwhandleSizeChange"
                                                    @CurrentChange="teampqdwhandleCurrentChange">
                                        </pagination>
                                    </div>
                                </div>
                                <div class="title">
                                    投保记录
                                </div>
                                <div class="flexvetweenbox" style="padding-right:12px;">
                                    <div class="accountinputbox">
                                        <div class="radiolable">投保时间：</div>
                                        <div style="width:400px;">
                                            <el-date-picker v-model="tyrbinsuretbjldate"
                                                            @change="gettyrbRecordofinsurance" type="daterange"
                                                            start-placeholder="开始时间" end-placeholder="结束时间"
                                                            range-separator="至"
                                                            value-format="YYYY-MM-DD"></el-date-picker>
                                        </div>
                                    </div>
                                    <div>
                                        <el-button type="primary" size="default" class="my_btn" @click="exporttyrbtbjl">
                                            <el-icon>
                                                <Upload/>
                                            </el-icon>
                                            导出列表
                                        </el-button>
                                    </div>
                                </div>
                                <div class="insureChecktable" style="margin-top:16px;">
                                    <el-table :data="tyrbinsuretbjltabledate" height="450"
                                              style="width: 100%; margin-top: 0" :header-cell-style="{
                                            background: '#FAFAFC',
                                            color: '#202536',
                                        }">
                                        <el-table-column prop="serveCompanyName" label="派遣单位  "/>
                                        <el-table-column prop="comboName" label="方案名称"/>
                                        <el-table-column prop="insurePeoples" label="投保人数"/>
                                        <el-table-column prop="insureDay" label="投保日期">
                                        </el-table-column>
                                        <el-table-column prop="amount" label="金额"/>
                                        <el-table-column prop="increaseRate" label="费率">
                                            <template #default="scope">
                                                <!-- {{ scope.row.increaseRate * 100 }}% -->
                                                --
                                            </template>
                                        </el-table-column>
                                        <el-table-column label="操作" min-width="150">
                                            <template #default="scope">
                                                <div class="blue flexbox">
                                                    <div class="pointer"
                                                         @click="dayinsureexportone(scope.row.projectId)"
                                                         style="margin-right:8px;padding-right:8px;border-right:1px solid #F4F4F7">
                                                        导出
                                                    </div>
                                                    <div class="pointer" @click="dayinsuredetail(scope.row)">查看详情
                                                    </div>
                                                    <div class="pointer"
                                                         @click="dayinsureexportone(scope.row.projectId)"
                                                         style="margin-right:8px;padding-right:8px;border-right:1px solid #F4F4F7">
                                                        导出
                                                    </div>
                                                    <div class="pointer" @click="dayinsuredetail(scope.row)">查看详情
                                                    </div>
                                                </div>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="paginationborder">
                                        <pagination :total="tyrbinsuretbjltotal" :currentPage="tyrbinsuretbjlpagenum"
                                                    :pageSize="tyrbinsuretbjlpagesize"
                                                    @SizeChange="changetyrbinsuretbjlpagesize"
                                                    @CurrentChange="changetyrbinsuretbjlpagenum"></pagination>
                                    </div>
                                </div>
                            </div>
                            <div :class="{ msgbox: true }">
                                <div class="border">
                                    <div class="top">
                                        <div class="product flexcenterbox">
                                            <div>团意日保</div>
                                            <div v-if="isopentyrbstatus === null || isopentyrbstatus === 0"
                                                 class="isornoopentag bullopen">
                                                未维护保司
                                            </div>
                                            <div v-if="isopentyrbstatus === 2" class="isornoopentag bullopen">未提交保司审核
                                            </div>
                                            <div v-if="isopentyrbstatus === 3" class="isornoopentag bullopen">已提交保司审核
                                            </div>
                                            <div v-if="isopentyrbstatus === 4" class="isornoopentag bullopen">保司审核通过
                                            </div>
                                            <div v-if="isopentyrbstatus === 5" class="isornoopentag bullopen">保司审核失败
                                            </div>
                                            <div v-show="isopentyrbflag === 1" class="opentime">{{
                                                    tyrbopentime
                                                }}开通
                                            </div>
                                        </div>
                                        <div class="recharge pointer"></div>
                                    </div>
                                    <div class="form">
                                        <div class="productform">
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span class="red">*&nbsp;</span><span>所属销售：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-select filterable style="width: 100%;"
                                                               v-model="tyrbform.tyrbsaleid" @change="changetyrbxs"
                                                               placeholder="请选择销售">
                                                        <el-option v-for="item in allseller" :key="item.saleId"
                                                                   :label="item.saleName" :value="item.saleId"/>
                                                    </el-select>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span class="red">*&nbsp;</span><span>保险公司：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-select style="width: 100%;" v-model="tyrbform.bxgs"
                                                               placeholder="请选择保险公司">
                                                        <el-option v-for="item in tyrbbxgslist" :key="item.dictLabel"
                                                                   :label="item.dictLabel" :value="item.dictValue"/>
                                                    </el-select>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span class="red">*&nbsp;</span><span>&nbsp;商户号：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="tyrbform.shh" placeholder="请输入商户号"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;公司对公账户：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="tyrbform.gsdgzh"
                                                              placeholder="请输入公司对公账户"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;经办人姓名：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="tyrbform.jbrxm" placeholder="请输入经办人姓名"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;经办人身份证：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="tyrbform.jbrid"
                                                              placeholder="请输入经办人身份证"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span>&nbsp;经办人手机号：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="tyrbform.jbrphone"
                                                              placeholder="请输入经办人手机号"/>
                                                </div>
                                            </div>

                                            <!--                      <div class="formitem">-->
                                            <!--                        <div class="lable">-->
                                            <!--                          <span>&nbsp;&nbsp;收款渠道：</span>-->
                                            <!--                        </div>-->
                                            <!--                        <div class="lableform">-->
                                            <!--                          <el-select-->
                                            <!--                              style="width: 100%;"-->
                                            <!--                              v-model="tyrbform.payditch"-->
                                            <!--                              placeholder="请选择收款渠道"-->
                                            <!--                              @change="changetyditch"-->
                                            <!--                          >-->
                                            <!--                            <el-option-->
                                            <!--                                v-for="item in ditchoptions"-->
                                            <!--                                :key="item.name"-->
                                            <!--                                :label="item.name"-->
                                            <!--                                :value="item.id"-->
                                            <!--                            />-->
                                            <!--                          </el-select>-->
                                            <!--                        </div>-->
                                            <!--                      </div>-->
                                            <!--                      <div class="formitem">-->
                                            <!--                        <div class="lable">-->
                                            <!--                          <span>&nbsp;&nbsp;收款账号：</span>-->
                                            <!--                        </div>-->
                                            <!--                        <div class="lableform">-->
                                            <!--                          <el-select-->
                                            <!--                              style="width: 100%;"-->
                                            <!--                              v-model="tyrbform.payadmin"-->
                                            <!--                              placeholder="请选择收款账号"-->
                                            <!--                          >-->
                                            <!--                            <el-option-->
                                            <!--                                v-for="item in skzhlisttyrb"-->
                                            <!--                                :key="item.id"-->
                                            <!--                                :label="item.bankName"-->
                                            <!--                                :value="item.id"-->
                                            <!--                            />-->
                                            <!--                          </el-select>-->
                                            <!--                        </div>-->
                                            <!--                      </div>-->
                                        </div>
                                        <div class="flexcenterbox">
                                            <el-button class="my_btn" @click="changetyrbsale"
                                                       v-show="isopentyrbflag === 1" type="primary">确定
                                            </el-button>
                                            <el-button class="my_btn" @click="settyrbsale" v-show="isopentyrbflag !== 1"
                                                       type="primary">确定
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="蚂蚁保" name="6" v-if="false">
                        <div class="tabcontentbox">
                            <div class="tablebox">
                                <maYiInsuranceDetail :companyId="companyId" :companyName="companyName"/>
                            </div>
                            <div :class="{ msgbox: true }">
                                <div class="border">
                                    <div class="top">
                                        <div class="product flexcenterbox">
                                            <div>蚂蚁保</div>
                                            <div v-if="isopenmybstatus === null || isopenmybstatus === 0"
                                                 class="isornoopentag bullopen">
                                                未维护保司
                                            </div>
                                            <div v-if="isopenmybstatus === 2" class="isornoopentag bullopen">未提交保司审核
                                            </div>
                                            <div v-if="isopenmybstatus === 3" class="isornoopentag bullopen">已提交保司审核
                                            </div>
                                            <div v-if="isopenmybstatus === 4" class="isornoopentag bullopen">保司审核通过
                                            </div>
                                            <div v-if="isopenmybstatus === 5" class="isornoopentag bullopen">保司审核失败
                                            </div>
                                            <div v-show="isopenmybflag === 1" class="opentime">{{
                                                    mybopentime
                                                }}开通
                                            </div>
                                        </div>
                                        <div class="recharge pointer"></div>
                                    </div>
                                    <div class="form">
                                        <div class="productform">
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span class="red">*&nbsp;</span><span>所属销售：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-select filterable style="width: 100%;"
                                                               v-model="mybform.mybsaleid" @change="changetyrbxs"
                                                               placeholder="请选择销售">
                                                        <el-option v-for="item in allseller" :key="item.saleId"
                                                                   :label="item.saleName" :value="item.saleId"/>
                                                    </el-select>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span class="red">*&nbsp;</span><span>&nbsp;商户号：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="mybform.shh" placeholder="请输入商户号"/>
                                                </div>
                                            </div>
                                            <div class="formitem">
                                                <div class="lable">
                                                    <span class="red">*&nbsp;</span><span>&nbsp;企业支付宝号：</span>
                                                </div>
                                                <div class="lableform">
                                                    <el-input v-model="mybform.qyzfbh"
                                                              placeholder="请输入企业支付宝号"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="flexcenterbox">
                                            <el-button class="my_btn" @click="changetyrbsale"
                                                       v-show="isopentyrbflag === 1" type="primary">确定
                                            </el-button>
                                            <el-button class="my_btn" @click="settyrbsale" v-show="isopentyrbflag !== 1"
                                                       type="primary">确定
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="电子签" name="5">
                        <div class="tabcontentbox">
                            <div class="tablebox">
                                <electronicVisaDetail :ref="electronicVisaDetaildom" :companyId="companyId"
                                                      :companyName="companyName"/>
                            </div>
                            <div :class="{ msgbox: true }">
                                <div class="border">
                                    <div class="top">
                                        <div class="product">电子签充值</div>
                                        <div class="recharge pointer" @click="openeleczjltc">充值消费记录</div>
                                    </div>
                                    <div class="productform">
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>金额：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input-number v-model="eleje" placeholder="请输入金额" :min="1"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>份数：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-input-number v-model="elefs" placeholder="请输入份数" :min="1"/>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>付款方式：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="elefkfs"
                                                           placeholder="请选择付款方式"
                                                           clearable>
                                                    <el-option value="1" label="公对公付款"/>
                                                    <el-option value="3" label="私对公付款"/>
                                                    <el-option value="4" label="赠送"/>
                                                    <el-option value="2" label="微信付款"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>收款账号：</span>
                                            </div>
                                            <div class="lableform">
                                                <el-select style="width: 100%;" v-model="eleskzh"
                                                           placeholder="请选择收款账号"
                                                           clearable @focus="focuseeleadmin">
                                                    <el-option v-for="item in eleadminlist" :key="item.id"
                                                               :label="item.bankName" :value="item.id"/>
                                                </el-select>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable">
                                                <span class="red">*&nbsp;</span><span>上传凭证：</span>
                                            </div>
                                            <div class="lableform" style="margin-right:10px">
                                                <el-upload drag class="upload-demo" ref="eledetailuploadref"
                                                           :file-list="elefilelist" :on-change="elefilelistchange"
                                                           :before-remove="removeelepz" accept=".png,.jpeg,.jpg,.pdf"
                                                           :limit="1" :on-exceed="elehandleExceed" :auto-upload="false">
                                                    <!-- <el-icon class="el-icon--upload"><upload-filled /></el-icon> -->
                                                    <div class="el-upload__text">
                                                        + 添加附件
                                                    </div>
                                                    <template #tip>
                                                        <div class="el-upload__tip">
                                                            <span class="blue">上传附件</span>大小限制5MB，支持png、jpeg、jpg、pdf格式文件
                                                        </div>
                                                    </template>
                                                </el-upload>
                                            </div>
                                        </div>
                                        <div class="formitem">
                                            <div class="lable"><span>备注:&nbsp;&nbsp;</span>
                                            </div>
                                            <div class="lableform" style="margin-right:10px">
                                                <el-input v-model="eleremark" type="textarea"/>
                                            </div>
                                        </div>
                                        <div class="flexcenterbox" style="margin-top:24px">
                                            <el-button class="my_canclebtn" @click="eleRechargecancel">取消
                                            </el-button>
                                            <el-button class="my_btn" type="primary" @click="elerecharge">确定
                                            </el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </div>
        <!-- 导出账户明细时间选择弹窗 -->
        <el-dialog v-model="choosetimetz" title="选择导出时间段" :width="isMobile ? '480' : '25%'" center>
            <div class="flexcenterbox">
                <el-date-picker v-model="uploadtime" value-format="YYYY-MM-DD" type="daterange" range-separator="至"
                                start-placeholder="开始时间" end-placeholder="结束时间"/>
                <el-date-picker v-model="uploadtime" value-format="YYYY-MM-DD" type="daterange" range-separator="至"
                                start-placeholder="开始时间" end-placeholder="结束时间"/>
            </div>
            <div class="flexcenterbox" style="margin-top: 16px;">
                <el-button class="my_cancelbtn" @click="uploadzhmxcancel">取消
                </el-button>
                <el-button class="my_btn" @click="uploadzhmxok">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 修改开通pc弹框 -->
        <el-dialog v-model="dialogchangeroleoropenpcVisible" :title="changeroleoropenpctitle"
                   :width="isMobile ? '480' : '25%'">
            <div class="changeroleformitem" style="margin-bottom:10px">
                <div class="changerolelable" style="color:#9497B1;">已选用户：
                </div>
                <div class="changerolelablecontent blue">{{ changeroleusername }}</div>
            </div>
            <div class="changeroleformitem">
                <div class="changerolelable">平台权限：</div>
                <div class="changerolelablecontent">
                    <el-select v-model="pingtai" style="width: 150px" placeholder="请选择平台">
                        <el-option label="发薪小程序" :value="0"/>
                        <el-option label="pc端" :value="1"/>

                    </el-select>
                </div>
            </div>
            <div class="changeroleformitem">
                <div class="changerolelable">用户角色：</div>
                <div class="changerolelablecontent">
                    <el-radio-group v-model="rolecode" class="ml-4">
                        <el-radio :label="1" size="large">管理员
                        </el-radio>
                        <el-radio :label="0" size="large">普通成员
                        </el-radio>
                    </el-radio-group>
                </div>
            </div>
            <div class="changeroletext" v-if="rolecode === 0">团队普通成员角色，可查看操作除子弹发薪外其他已开通产品的团队项目权限。
            </div>
            <div class="changeroletext" v-if="rolecode === 1">
                除子弹发薪外的团队管理者角色，可查看操作除子弹发薪外的其他已开通产品权限。管理员拥有对团队人员、团队账户、团队项目的操作管理权限。
            </div>
            <template #footer>
                <span class="dialog-footer">
                    <el-button class="my_btn" type="primary" @click="changeroleok">
                        确定
                    </el-button>
                    <el-button class="my_cancelbtn" @click="dialogchangeroleoropenpcVisible = false">取消</el-button>
                </span>
            </template>
        </el-dialog>
        <!--    可欠费额度设置-->
        <el-dialog v-model="kqfedtc" title="可欠费额度设置" width="400">
            <div class="switchbox">
                <div class="switchitem">
                    <div class="switchlable">
                        <div><span class="red">*</span>可欠费额度：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-input-number v-model="kqfednum" :precision="2" :min="0"/>
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-top:16px;">
                <el-button class="my_cancelbtn" @click="closekqfedtc">取消
                </el-button>
                <el-button class="my_btn" @click="submitkqfed">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 账户设置弹窗 -->
        <el-dialog v-model="setrebatetc" title="返利设置" width="293">
            <div class="switchbox">
                <div class="switchitem">
                    <div class="switchlable">
                        <div><span class="red">*</span>是否允许返利：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch v-model="rebatevalue" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-top:16px;">
                <el-button class="my_cancelbtn" @click="setrebatecancel">取消
                </el-button>
                <el-button class="my_btn" @click="setrebatesure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 公司基本信息编辑弹窗 -->
        <el-dialog v-model="dialogbasemsgVisible" title="基本信息" :width="isMobile ? '960' : '50%'">
            <div class="editformitem">
                <div class="formitem_l">
                    <span>&#12288&#12288公司简称</span>
                    <el-input v-model="editform.companyAbbreviation" placeholder="请输入公司简称"/>
                </div>
                <div class="formitem_r">
                    <span>&#12288&#12288收款账户</span>
                    <el-select v-model="editform.receiptId" style="width: 100%;" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </div>
            </div>
            <div class="editformitem">
                <div class="formitem_l">
                    <span>营业执照编码</span>
                    <el-input v-model="editform.creditCode" placeholder="请输入营业执照编码"/>
                </div>
                <div class="formitem_r">
                    <span>客户充值账号</span>
                    <el-input v-model="editform.merchantBankCard" placeholder="请输入开户行及行号"/>
                </div>
            </div>
            <div class="editformitem">
                <div class="formitem_l">
                    <span>营业执照地址</span>
                    <el-input v-model="editform.yyzzarea" placeholder="请输入营业执照地址"/>
                </div>
                <div class="formitem_r">
                    <span>&#12288&#12288所在区域</span>
                    <el-input v-model="editform.area" placeholder="请输入公司地址"/>
                </div>
            </div>
            <div class="editformitem">
                <div class="formitem_l">
                    <span>&#12288&#12288公司法人</span>
                    <el-input v-model="editform.legalPerson" placeholder="请输入公司法人"/>
                </div>
                <div class="formitem_r">
                    <span>&#12288&#12288单日额度</span>
                    <el-input v-model="editform.dailyQuota" placeholder="请输入单日额度"/>
                </div>
            </div>
            <div class="editformitem">
                <div class="formitem_l">
                    <span>&#12288&#12288&#12288商户号</span>
                    <el-input v-model="editform.subMchid" placeholder="请输入商户号"/>
                </div>
                <div class="formitem_r">
                    <span>单日可领额度</span>
                    <el-input v-model="editform.personSingleQuota" placeholder="请输入单日可领额度"/>
                </div>
            </div>
            <div class="editformitem">
                <div class="formitem_l">
                    <span>&#12288&#12288渠道选择</span>
                    <el-select v-model="ditch" style="width: 100%;" placeholder="请选择渠道信息"
                               @change="changeauditStatus">
                        <el-option v-for="item in ditchoptions" :key="item.name" :label="item.name"
                                   :value="item.id"/>
                    </el-select>
                </div>
                <div class="formitem_r">
                </div>
            </div>
            <div class="flexcenterbox">
                <el-button class="my_cancelbtn" @click="editbasemsgcancel">取消
                </el-button>
                <el-button class="my_btn" @click="editbasemsgsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 审核信息弹窗 -->
        <el-dialog v-model="dialogauditVisible" title="审核信息" :width="isMobile ? '480' : '25%'">
            <div>
                <el-form :model="form" label-width="120px">
                    <el-form-item label="审核状态：">
                        <el-radio-group v-model="cauditStatuscopy" @change="changeshStatus">
                            <el-radio :label="1">审核通过</el-radio>
                            <el-radio :label="2">审核驳回</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item label="渠道选择：">
                        <el-select v-model="ditch" class="m-2" placeholder="请选择渠道信息" @change="changeauditStatus">
                            <el-option v-for="item in ditchoptions" :key="item.name" :label="item.name"
                                       :value="item.id"/>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="所属行业：">
                        <el-select v-model="companyIndustry" class="m-2" placeholder="请选择所属行业">
                            <el-option v-for="item in industrylist" :key="item.dictLabel" :label="item.dictLabel"
                                       :value="item.dictValue"/>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="收款账户选择：">
                        <el-select v-model="cpayadmin" placeholder="请选择收款账号">
                            <el-option v-for="item in changecompanystatusadminlist" :key="item.id"
                                       :label="item.bankName" :value="item.id"/>
                        </el-select>
                    </el-form-item>
                </el-form>
            </div>
            <div style="display: flex; align-items: center; justify-content: center">
                <div class="my_cancelbtn" @click="companystatuscancel" style="
            width: 60px;
            height: 30px;
            line-height: 30px;
            border-radius: 10px;
            text-align: center;
            margin: 0 10px;
          ">
                    取消
                </div>
                <div class="my_btn" @click="submitditch" style="
            width: 60px;
            height: 30px;
            line-height: 30px;
            border-radius: 10px;
            text-align: center;
            margin: 0 10px;
          ">
                    确定
                </div>
            </div>
        </el-dialog>
        <!-- 产看凭证弹出框 -->
        <el-dialog v-model="dialogczpzVisible" title="充值凭证查看" :width="isMobile ? '580' : '30%'">
            <div style="text-align: center">
                <img style="width: 100%" crossorigin="anonymous" :src="checkczpzimg" alt=""/>
            </div>
        </el-dialog>
        <!-- 重置手机号弹出框 -->
        <el-dialog v-model="changephonedialog" title="重置手机号" :width="isMobile ? '480' : '25%'">
            <el-form-item label="已选用户：" label-width="100px">
                <el-input v-model="changephoneform.name" type="text"/>
            </el-form-item>
            <el-form-item label="确认新号码：" label-width="100px">
                <el-input v-model="changephoneform.phone" type="text" placeholder="请输入新号码"/>
            </el-form-item>
            <template #footer>
                <span class="dialog-footer">
                    <el-button type="primary" @click="changephoneok"> 确定 </el-button>
                    <el-button @click="changephoneno">取消</el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 重置密码弹出框 -->
        <el-dialog v-model="dialogresetpasswordcVisible" title="重置密码" :width="isMobile ? '480' : '25%'">
            <el-form-item label="当前登录密码:">
                <el-input v-model="resetpasswordform.password" type="password" placeholder="请输入当前登录密码"
                          show-password/>
            </el-form-item>
            <template #footer>
                <span class="dialog-footer">
                    <el-button type="primary" @click="resetpasswordok"> 确定 </el-button>
                    <el-button @click="resetpasswordcancel">取消</el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 重置pc密码弹出框 -->
        <el-dialog v-model="dialogresetpasswordcVisiblepc" title="重置密码" :width="isMobile ? '480' : '25%'">
            <el-form-item label="输入密码：">
                <el-input v-model="resetpasswordformpc.password" type="password" placeholder="请输入新密码"
                          show-password/>
            </el-form-item>
            <template #footer>
                <span class="dialog-footer">
                    <el-button type="primary" @click="resetpasswordokpc"> 确定 </el-button>
                    <el-button @click="resetpasswordcancelpc">取消</el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 审核对话框 -->
        <!-- 子弹发薪 -->
        <el-drawer v-model="bullaudit" class="drawer" :title="audittitle + '充值付费审核'" :destroy-on-close="true"
                   direction="rtl" :size="isMobile ? '100%' : '30%'">
            <div class="closedrawer" @click="bullhideout">
                <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
            </div>
            <el-form ref="bullruleFormRef" :model="bullruleForm" :rules="bullrules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="套餐名称" prop="package">
                    <el-input v-model="bullruleForm.package" disabled/>
                </el-form-item>
                <el-form-item label="服务金额" prop="price">
                    <el-input v-model="bullruleForm.price" disabled/>
                </el-form-item>
                <el-form-item label="购买月份" prop="paym">
                    <el-input v-model="bullruleForm.paym" disabled/>
                </el-form-item>
                <el-form-item v-if='bullruleForm.salesScenario !== 2' label="产品过期时间" prop="overtime">
                    <el-date-picker v-model="bullruleForm.overtime" type="date" placeholder="过期时间"/>
                </el-form-item>
                <el-form-item
                    v-if='bullruleForm.salesScenario == 2 || bullruleForm.salesScenario == 3 || bullruleForm.salesScenario == 4'
                    label="席位过期时间" prop="seatovertime">
                    <el-date-picker v-model="bullruleForm.seatovertime" type="date" placeholder="过期时间"/>
                </el-form-item>
                <el-form-item label="另购席位" prop="otherseat">
                    <el-input v-model="bullruleForm.otherseat" disabled/>
                </el-form-item>
                <el-form-item label="付款方式" prop="paymode">
                    <el-select v-model="bullruleForm.paymode" placeholder="请选择付款方式">
                        <el-option v-for="item in paytypes" :key="item.value" :label="item.label" :value="item.value"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="收款账户" prop="receptid">
                    <el-select v-model="bullruleForm.receptid" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-image style="width: 100px; height: 100px" crossorigin="anonymous" :src="bullruleForm.img"
                              :zoom-rate="1.2" :preview-src-list="[bullruleForm.img]" :initial-index="0" fit="cover"/>
                    <!-- <img style="width: 100px; height: 100px" crossorigin="anonymous" :src="bullruleForm.img" alt="" /> -->
                </el-form-item>
                <el-form-item label="备注" prop="desc">
                    <el-input v-model="bullruleForm.remak" maxlength="50" show-word-limit type="textarea"
                              placeholder="请输入备注"/>
                </el-form-item>
            </el-form>
            <template #footer>
                <div style="display: flex; align-items: center; justify-content: center" v-show="allowoperate">
                    <el-button style="color: #eb3435" @click="bullreject('bull')">驳回
                    </el-button>
                    <el-button type="primary" style="background-color: #0256ff"
                               @click="bullsubmitForm(bullruleFormRef)">通过
                    </el-button>
                </div>
            </template>
        </el-drawer>
        <!-- 电子签 -->
        <el-drawer v-model="eleaudit" class="drawer" :title="audittitle + '充值付费审核'" direction="rtl"
                   :size="isMobile ? '100%' : '30%'">
            <div class="closedrawer" @click="elehideout">
                <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
            </div>
            <el-form ref="eleruleFormRef" :model="eleruleForm" :rules="elerules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="充值金额" prop="price">
                    <el-input v-model="eleruleForm.price" disabled/>
                </el-form-item>
                <el-form-item label="份数" prop="num">
                    <el-input v-model="eleruleForm.num" disabled/>
                </el-form-item>
                <el-form-item label="付款方式" prop="paymode">
                    <el-select v-model="eleruleForm.paymode" placeholder="请选择付款方式">
                        <el-option v-for="item in paytypes" :key="item.value" :label="item.label" :value="item.value"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="收款账户" prop="receptid">
                    <el-select v-model="eleruleForm.receptid" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-image style="width: 100px; height: 100px" crossorigin="anonymous" :src="eleruleForm.img"
                              :zoom-rate="1.2" :preview-src-list="[eleruleForm.img]" :initial-index="0" fit="cover"/>
                    <!-- <img style="width: 100px; height: 100px" crossorigin="anonymous" :src="eleruleForm.img" alt="" /> -->
                </el-form-item>
                <el-form-item label="备注" prop="desc">
                    <el-input v-model="eleruleForm.remak" maxlength="50" show-word-limit type="textarea"
                              placeholder="请输入备注"/>
                </el-form-item>
            </el-form>
            <template #footer>
                <div style="flex: auto" v-show="allowoperate">
                    <el-button style="color: #eb3435" @click="elereject('ele')">驳回
                    </el-button>
                    <el-button type="primary" style="background-color: #0256ff"
                               @click="elesubmitForm(eleruleFormRef)">通过
                    </el-button>
                </div>
            </template>
        </el-drawer>
        <!-- 日日保 -->
        <el-drawer v-model="everyaudit" class="drawer" :title="audittitle + '充值付费审核'" direction="rtl"
                   :size="isMobile ? '100%' : '30%'">
            <div class="closedrawer" @click="everyhideout">
                <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
            </div>
            <el-form ref="everyruleFormRef" :model="everyruleForm" :rules="everyrules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="充值金额" prop="price">
                    <el-input disabled v-model="everyruleForm.price"/>
                </el-form-item>
                <el-form-item label="付款方式" prop="paymode">
                    <el-select v-model="everyruleForm.paymode" placeholder="请选择付款方式">
                        <el-option v-for="item in paytypes" :key="item.value" :label="item.label" :value="item.value"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="收款账户" prop="receptid">
                    <el-select v-model="everyruleForm.receptid" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-image style="width: 100px; height: 100px" crossorigin="anonymous" :src="everyruleForm.img"
                              :zoom-rate="1.2" :preview-src-list="[everyruleForm.img]" :initial-index="0" fit="cover"/>
                    <!-- <img style="width: 100px; height: 100px" crossorigin="anonymous" :src="everyruleForm.img" alt="" /> -->
                </el-form-item>
                <el-form-item label="备注" prop="desc">
                    <el-input v-model="everyruleForm.remak" maxlength="50" show-word-limit type="textarea"
                              placeholder="请输入备注"/>
                </el-form-item>
            </el-form>
            <template #footer>
                <div style="flex: auto" v-show="allowoperate">
                    <el-button style="color: #eb3435" @click="everyreject('every')">驳回
                    </el-button>
                    <el-button type="primary" style="background-color: #0256ff"
                               @click="everysubmitForm(everyruleFormRef)">通过
                    </el-button>
                </div>
            </template>
        </el-drawer>
        <!-- 长期保 -->
        <el-drawer v-model="longaudit" class="drawer" :title="audittitle + '充值付费审核'" direction="rtl"
                   :size="isMobile ? '100%' : '30%'">
            <div class="closedrawer" @click="longhideout">
                <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
            </div>
            <el-form ref="longruleFormRef" :model="longruleForm" :rules="longrules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item disabled label="充值金额" prop="price">
                    <el-input v-model="longruleForm.price" disabled/>
                </el-form-item>
                <el-form-item label="付款方式" prop="paymode">
                    <el-select v-model="longruleForm.paymode" placeholder="请选择付款方式">
                        <el-option v-for="item in paytypes" :key="item.value" :label="item.label" :value="item.value"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="收款账户" prop="receptid">
                    <el-select v-model="longruleForm.receptid" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-image style="width: 100px; height: 100px" crossorigin="anonymous" :src="longruleForm.img"
                              :zoom-rate="1.2" :preview-src-list="[longruleForm.img]" :initial-index="0" fit="cover"/>
                    <!-- <img style="width: 100px; height: 100px" crossorigin="anonymous" :src="longruleForm.img" alt="" /> -->
                </el-form-item>
                <el-form-item label="备注" prop="desc">
                    <el-input v-model="longruleForm.remak" maxlength="50" show-word-limit type="textarea"
                              placeholder="请输入备注"/>
                </el-form-item>
            </el-form>
            <template #footer>
                <div style="flex: auto" v-show="allowoperate">
                    <el-button style="color: #eb3435" @click="longreject('long')">驳回
                    </el-button>
                    <el-button type="primary" style="background-color: #0256ff"
                               @click="longsubmitForm(longruleFormRef)">通过
                    </el-button>
                </div>
            </template>
        </el-drawer>
        <!-- 群发消息 -->
        <el-drawer v-model="messageaudit" class="drawer" :title="audittitle + '充值付费审核'" direction="rtl"
                   :size="isMobile ? '100%' : '30%'">
            <div class="closedrawer" @click="messagehideout">
                <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
            </div>
            <el-form ref="messageruleFormRef" :model="messageruleForm" :rules="messagerules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="充值金额" prop="price">
                    <el-input disabled v-model="messageruleForm.price"/>
                </el-form-item>
                <el-form-item label="付款方式" prop="paymode">
                    <el-select v-model="messageruleForm.paymode" placeholder="请选择付款方式">
                        <el-option v-for="item in paytypes" :key="item.value" :label="item.label" :value="item.value"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="收款账户" prop="receptid">
                    <el-select v-model="messageruleForm.receptid" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-image style="width: 100px; height: 100px" crossorigin="anonymous" :src="messageruleForm.img"
                              :zoom-rate="1.2" :preview-src-list="[messageruleForm.img]" :initial-index="0"
                              fit="cover"/>
                    <!-- <img style="width: 100px; height: 100px" crossorigin="anonymous" :src="messageruleForm.img" alt="" /> -->
                </el-form-item>
                <el-form-item label="备注" prop="desc">
                    <el-input v-model="messageruleForm.remak" maxlength="50" show-word-limit type="textarea"
                              placeholder="请输入备注"/>
                </el-form-item>
            </el-form>
            <template #footer>
                <div style="flex: auto" v-show="allowoperate">
                    <el-button style="color: #eb3435" @click="messagereject('message')">驳回
                    </el-button>
                    <el-button type="primary" style="background-color: #0256ff"
                               @click="messagesubmitForm(messageruleFormRef)">通过
                    </el-button>
                </div>
            </template>
        </el-drawer>
        <!-- 账户设置弹窗 -->
        <el-dialog v-model="adminsettc" title="账户设置" width="293">
            <div class="switchbox">
                <div class="switchitem">
                    <div class="switchlable">
                        <div><span class="red">*</span>拒保：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch v-model="blacklist" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
                <!-- <div class="switchitem">
          <div class="switchlable">
            <div class="red">*</div><div>倒投保：</div>
          </div>
          <div class="switchlablecontent">
            <el-switch v-model="dtb" class="ml-2" style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc" />
          </div>
        </div> -->
            </div>
            <div class="flexcenterbox" style="margin-top:16px;">
                <el-button class="my_cancelbtn" @click="setadmincancel">取消
                </el-button>
                <el-button class="my_btn" @click="setadminsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 长期保超龄设置弹窗 -->
        <el-dialog v-model="overagetc" title="超龄投保设置" width="1100">
            <el-input style="width:300px;" v-model="allowoveragenum" type="number" placeholder="请输入允许超龄人数">
                <template #prepend>
                    允许超龄人数
                </template>
            </el-input>
            <div class="overagetc_title">
                <div class="bord">数据列表</div>
                <div>当前超65岁以上人员：</div>
                <div class="blue">{{ longoveragelist.length }}人</div>
            </div>
            <el-table :data="longoveragelist" style="width: 100%; margin-top: 16px" :header-cell-style="{
                background: '#FAFAFC',
                color: '#202536',
            }">
                <el-table-column prop="userName" label="姓名"/>
                <el-table-column prop="idCardNo" label="身份证号"/>
                <el-table-column prop="age" label="年龄"/>
                <el-table-column prop="insurStartTime" label="生效时间"/>
                <el-table-column prop="insurEndTime" label="结束时间"/>
                <el-table-column label="操作">
                    <template #default="scope">
                        <div class='pointer blue' @click="longinsurejb(scope.row)">减保
                        </div>
                    </template>
                </el-table-column>
            </el-table>
            <div class="flexcenterbox" style="margin-top:16px;">
                <el-button class="my_btn" @click="setoveragenumsure">提交
                </el-button>
                <el-button class="my_cancelbtn" @click="setoveragenumcancel">取消
                </el-button>
            </div>
        </el-dialog>
        <!-- 长期保超龄减保时间选择弹窗 -->
        <el-dialog v-model="longinsurejbtime" title="减保" width="500">
            <el-form ref="longinsuresettimeRef" :model="longinsuresettimeform" :rules="longinsuresettimerules"
                     label-width="120px" class="demo-ruleForm" status-icon>
                <el-form-item prop="date" label="减保时间：" required>
                    <el-date-picker :disabled-date="disabledDate" @change="change" v-model="longinsuresettimeform.date"
                                    type="date" placeholder="请选择时间" style="width: 100%"/>
                </el-form-item>
                <div class="flexcenterbox" style="margin-top:16px">
                    <el-button class="my_btn" type="primary" @click="submitlonginsurejbtime(longinsuresettimeRef)">
                        确定
                    </el-button>
                    <el-button class="my_cancelbtn" @click="resetlonginsurejbtime(longinsuresettimeRef)">取消
                    </el-button>
                </div>
            </el-form>
        </el-dialog>
        <!-- 长期保一键续保弹窗 -->
        <div class="yjxb" v-show="onceaddinsuretc">
            <el-drawer v-model="onceaddinsuretc" class="addinsuredrawer" title="一键续保" direction="rtl"
                       :size="isMobile ? '100%' : '60%'">
                <div class="closedrawer" @click="closeaddinsuretc">
                    <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
                </div>
                <div class="yjxbtabbox">
                    <div :class="{ yjxbtabitem: true, yjxbactive: yjxbtabflag === index }"
                         v-for="(ele, index) in yjxbtablemsg" :key="index" @click="changeyjxbtab(ele, index)">{{
                            ele.companyPlanName
                        }}
                    </div>
                </div>
                <div class="yjxbtop">
                    <div class="yjxbtoptext">一键续保当前公司各方案的系统自动减保人员，不包含后续操作过投保的人员</div>
                    <el-button type="primary" size="default" class="my_btn" @click="yjxbsure">一键续保
                    </el-button>
                </div>
                <div class="flexbox" style='margin-bottom:16px'>
                    <div class="lablebox">
                        <span class="lablename">公司名称：</span>
                        <span class="lablecontent">{{ yjxbcompanyName }}</span>
                    </div>
                    <div class="lablebox">
                        <span class="lablename">自动减保时间：</span>
                        <span class="lablecontent">{{ yjxbautotime }}</span>
                    </div>
                </div>
                <el-table :data="showedyjxbtablemsg" style="width: 100%; margin-top: 16px" height="500"
                          :header-cell-style="{
                        background: '#FAFAFC',
                        color: '#202536',
                    }">
                    <el-table-column prop="serveCompanyName" label="派遣单位"/>
                    <el-table-column prop="userName" label="被保人"/>
                    <el-table-column prop="idCardNo" label="身份证号"/>
                    <el-table-column prop="occupationName" label="工种名称"/>
                    <el-table-column prop="occupationLevel" label="工种等级"/>
                    <el-table-column prop="code" label="工种编码"/>
                    <el-table-column prop="insurStartTime" label="在保开始时间"/>
                    <el-table-column prop="insurEndTime" label="在保结束时间"/>
                </el-table>
            </el-drawer>
        </div>
        <!-- 查看保险方案弹窗 -->
        <div class="yjxb" v-show="insuretypetc">
            <el-drawer v-model="insuretypetc" class="addinsuredrawer" title="保险方案" direction="rtl"
                       :size="isMobile ? '100%' : '60%'">
                <div class="closedrawer" @click="closeinsuretypetc">
                    <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
                </div>
                <div class="insuretypeformbox">
                    <div class="flexvetweenbox" style="margin-bottom: 16px;">
                        <div class="insuretypeformitem">
                            <div class="formlable mg-r-5 flex-no-shrink fs-14">方案状态</div>
                            <el-select @change="getcompanyinsuretype" clearable style="width: 200px;margin-right:20px"
                                       v-model="insuretypeauditStatus" class="m-2" placeholder="请选择">
                                <el-option key="0" label="已失效" value="1"/>
                                <el-option key="1" label="未失效" value="0"/>
                            </el-select>
                        </div>
                        <div class="insuretypeformitem">
                            <div class="formlable mg-r-5 flex-no-shrink fs-14">开始时间</div>
                            <el-date-picker style="width: 200px;margin-right:20px" @change="getcompanyinsuretype"
                                            v-model="insuretypestarttime" type="date" value-format="YYYY-MM-DD"
                                            placeholder="请选择开始时间"/>
                        </div>
                        <div class="insuretypeformitem">
                            <div class="formlable mg-r-5 flex-no-shrink fs-14">结束时间</div>
                            <el-date-picker style="width: 200px;margin-right:20px" @change="getcompanyinsuretype"
                                            v-model="insuretypeendtime" type="date" value-format="YYYY-MM-DD"
                                            placeholder="请选择结束时间"/>
                        </div>
                        <el-button class="my_btn" @click="InsurComCompanyPlansexport">导出
                        </el-button>
                    </div>
                    <div class="flexvetweenbox">
                        <div class="insuretypeformitem">
                            <div class="formlable mg-r-5 flex-no-shrink fs-14">重复投保</div>
                            <el-select @change="getcompanyinsuretype" clearable style="width: 200px;margin-right:20px"
                                       v-model="insuretypeisAllowedRepeat" class="m-2" placeholder="请选择">
                                <el-option key="0" label="否" value="0"/>
                                <el-option key="1" label="是" value="1"/>
                            </el-select>
                        </div>
                        <div class="insuretypeformitem">
                            <div class="formlable mg-r-5 flex-no-shrink fs-14">减保</div>
                            <el-select @change="getcompanyinsuretype" clearable style="width: 200px;margin-right:20px"
                                       v-model="insuretypeallowedDetermineStatus" class="m-2" placeholder="请选择">
                                <el-option key="0" label="否" value="0"/>
                                <el-option key="1" label="是" value="1"/>
                            </el-select>
                        </div>
                        <div class="insuretypeformitem">
                            <div class="formlable mg-r-5 flex-no-shrink fs-14">跨司投保</div>
                            <el-select @change="getcompanyinsuretype" clearable style="width: 200px;margin-right:20px"
                                       v-model="insuretypeisCompanyAllowedRepeat" class="m-2" placeholder="请选择">
                                <el-option key="0" label="否" value="0"/>
                                <el-option key="1" label="是" value="1"/>
                            </el-select>
                        </div>
                        <div class="w60px"></div>
                    </div>
                </div>
                <div class="insuretypetitletext">
                    数据列表
                </div>
                <el-table :data="insuretypelist" style="width: 100%; margin-top: 0px" height="600" :header-cell-style="{
                    background: '#FAFAFC',
                    color: '#202536',
                }">
                    <el-table-column width="150" fixed="left" prop="insurCompanyName" label="承保公司"/>
                    <el-table-column width="300" prop="insurCompanyPlanName" label="保险方案">
                        <template #default="scope">
                            <div class="flex-center gap-10px">
                                <div>{{ scope.row.insurCompanyPlanName }}</div>
                                <el-tag v-if="scope.row.type === 3" type="warning">灵活投保</el-tag>
                                <el-tag v-if="scope.row.type === 3" type="warning">按日计费</el-tag>
                                <el-tag v-if="scope.row.type === 4" type="warning">月单</el-tag>
                                <el-tag v-if="scope.row.type === 4" type="warning">按月计费</el-tag>
                                <el-tag v-if="scope.row.type === 5" type="warning">即时生效</el-tag>
                                <el-tag v-if="scope.row.type === 5" type="warning">按日计费</el-tag>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column width="150" prop="headCount" label="当前在保人数"/>
                    <el-table-column width="150" prop="price" label="1-3类价格"/>
                    <el-table-column width="150" prop="priceFour" label="4类价格"/>
                    <el-table-column width="150" prop="priceFive" label="5类价格"/>
                    <el-table-column width="150" prop="beginTime" label="生效时间">
                        <template #default="scope">{{ scope.row.beginTime }}</template>
                    </el-table-column>
                    <el-table-column width="150" prop="endTime" label="结束时间">
                        <template #default="scope">{{ scope.row.endTime }}</template>
                    </el-table-column>
                    <el-table-column width="150" prop="hasEnsure" label="首次投保">
                        <template #default="scope">
                            <span>{{ scope.row.hasEnsure === true ? '是' : '否' }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column width="150" prop="ensureLimitThree" label="1-3类投保基数"/>
                    <el-table-column width="150" prop="ensureLimitFour" label="非5类含4类投保基数"/>
                    <el-table-column width="150" prop="ensureLimitFive" label="5类投保所需要14类基数"/>
                    <el-table-column width="150" prop="ensureLimit" label="最低投保人数"/>
                    <el-table-column width="150" prop="insureBase" label="5类投保占比"/>
                    <el-table-column width="150" prop="isAllowedRepeat" label="重复投保">
                        <template #default="scope">
                            <span>{{ scope.row.isAllowedRepeat === 1 ? '是' : '否' }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column width="150" prop="isCompanyAllowedRepea" label="跨司投保">
                        <template #default="scope">
                            <span>{{ scope.row.isCompanyAllowedRepea === 1 ? '是' : '否' }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column width="150" prop="allowedDetermineStatus" label="允许减保">
                        <template #default="scope">
                            <span>{{ scope.row.allowedDetermineStatus === 1 ? '是' : '否' }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column width="150" prop="updatePlanCount" label="方案修改记录">
                        <template #default="scope">
                            <span class="blue pointer" @click="changecompanyinsureplanhistorytcopen(scope.row)">{{
                                    scope.row.updatePlanCount
                                }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column width="200" fixed="right" label="操作">
                        <template #default="scope">
                            <div class='flexcenterbox'>
                                <div v-show="scope.row.type === 3" style="margin-right:10px;font-size: 14px;"
                                     @click="insureplanactivitytcopen(scope.row)" class="pointer blue">活动
                                </div>
                                <div style="margin-right:10px;font-size: 14px;" class="pointer blue"
                                     @click="changecompanyinsureplantcopen(scope.row.id)">修改方案
                                </div>
                                <div style="margin-right:10px;font-size: 14px;"
                                     @click="delinsurecompanyplanfn(scope.row.id)" class="pointer red">删除
                                </div>
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <pagination :total="insuretypetotal" :currentPage="insuretypepageNum" :pageSize="insuretypepageSize"
                            @SizeChange="changeinsuretypepageSize" @CurrentChange="changeinsuretypepageNum">
                </pagination>
            </el-drawer>
        </div>
        <!-- 修改公司保险方案弹窗 -->
        <el-dialog v-model="changecompanyinsureplantc" title="修改公司保险方案" :width="isMobile ? '1150' : '60%'">
            <div class="changecompanyinsureplantctop">
                <div class="changecompanyinsureplantctopitem">
                    <div class="lable">公司名称：</div>
                    <div class="lablecontent">{{ changecompanyinsureplan_companyName }}</div>
                </div>
                <div class="changecompanyinsureplantctopitem">
                    <div class="lable">方案名称：</div>
                    <div class="lablecontent">{{ changecompanyinsureplan_insurCompanyPlanName }}</div>
                </div>
            </div>
            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">3类价格：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_price" placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">3类投保基数限制：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_ensureLimitThree"
                                      placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">4类价格：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_priceFour" placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">4类投保基数限制：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_ensureLimitFour"
                                      placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
            </el-row>
            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">5类价格：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_priceFive" placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">5类投保基数限制：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_ensureLimitFive"
                                      placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <el-row class="mg-t-20" v-for="(i, index) in exceedConfig" :key="index">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">{{ i.name }}价格：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="i['p' + exceedPropName(index)]" placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">{{ i.name }}投保基数限制：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="i['el' + exceedPropName(index)]" placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">5类占比：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_insureBase" placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">生效时间：</div>
                        <div class="formlablecontent">
                            <el-date-picker class="flex-1" value-format="YYYY-MM-DD HH:m:s"
                                            v-model="changecompanyinsureplan_beginTime" type="datetime"
                                            placeholder="开始时间"
                                            format="YYYY/MM/DD HH:mm:ss"/>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center w-full">
                        <div class="formlable set-style">是否首次投保：</div>
                        <div class="formlablecontent">
                            <el-select clearable v-model="changecompanyinsureplan_hasEnsure" class="flex-1"
                                       placeholder="请选择">
                                <el-option label="否" :value="false"/>
                                <el-option label="是" :value="true"/>
                            </el-select>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">结束时间：</div>
                        <div class="formlablecontent">
                            <el-date-picker class="flex-1" value-format="YYYY-MM-DD HH:m:s"
                                            v-model="changecompanyinsureplan_endTime" type="datetime"
                                            placeholder="结束时间"
                                            format="YYYY/MM/DD HH:mm:ss"/>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">是否允许减保：</div>
                        <div class="formlablecontent">
                            <el-select clearable v-model="changecompanyinsureplan_allowedDetermineStatus" class="flex-1"
                                       placeholder="请选择">
                                <el-option :key="0" label="否" :value="0"/>
                                <el-option :key="1" label="是" :value="1"/>
                            </el-select>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">是否允许在别的保司进行投保：</div>
                        <div class="formlablecontent">
                            <el-select clearable v-model="changecompanyinsureplan_isCompanyAllowedRepeat" class="flex-1"
                                       placeholder="请选择">
                                <el-option :key="0" label="否" :value="0"/>
                                <el-option :key="1" label="是" :value="1"/>
                            </el-select>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <el-row class="mg-t-20">
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">是否允许重复投保：</div>
                        <div class="formlablecontent">
                            <el-select clearable v-model="changecompanyinsureplan_isAllowedRepeat" class="flex-1"
                                       placeholder="请选择">
                                <el-option :key="0" label="否" :value="0"/>
                                <el-option :key="1" label="是" :value="1"/>
                            </el-select>
                        </div>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="flex items-center">
                        <div class="formlable set-style">最低投保人数：</div>
                        <div class="formlablecontent">
                            <el-input class="flex-1" v-model="changecompanyinsureplan_ensureLimit"
                                      placeholder="请输入"/>
                        </div>
                    </div>
                </el-col>
            </el-row>

            <div>
                <div class="flexcenterbox" style="margin-top:16px">
                    <el-button class="my_cancelbtn" @click="changecompanyinsureplancancel">取消
                    </el-button>
                    <el-button class="my_btn" @click="changecompanyinsureplansure">確定
                    </el-button>
                </div>
            </div>
        </el-dialog>
        <!-- 方案修改记录弹窗 -->
        <el-dialog v-model="changecompanyinsureplanhistorytc" title="方案修改记录" top="8vh"
                   :width="isMobile ? '1730' : '90%'">
            <el-table :data="changecompanyinsureplanhistorylist" style="width: 100%; margin-top: 0px" height="500"
                      :header-cell-style="{
                    background: '#FAFAFC',
                    color: '#202536',
                }">
                <el-table-column width="150" fixed="left" prop="insurCompanyName" label="公司名称"/>
                <el-table-column width="150" prop="insurCompanyPlanName" label="方案名称"/>
                <el-table-column width="150" prop="price" label="1-3类价格"/>
                <el-table-column width="150" prop="priceFour" label="4类价格"/>
                <el-table-column width="150" prop="priceFive" label="5类价格"/>
                <el-table-column width="150" prop="ensureLimitThree" label="1-3类投保人数"/>
                <el-table-column width="150" prop="ensureLimitFour" label="4类投保人数"/>
                <el-table-column width="150" prop="ensureLimitFive" label="5类投保人数"/>
                <el-table-column width="150" prop="ensureLimit" label="最低投保人数"/>
                <el-table-column width="150" prop="insureBase" label="5类投保占比"/>
                <el-table-column width="150" prop="updateTime" label="修改时间"/>
            </el-table>
        </el-dialog>
        <!-- 加减保记录弹窗 -->
        <div class="yjxb" v-show="addlonginsurehistorytc">
            <el-drawer v-model="addlonginsurehistorytc" class="addinsuredrawer" title="加减保记录" direction="rtl"
                       :size="isMobile ? '100%' : '60%'">
                <div class="closedrawer" @click="closeaddlonginsurehistorytc">
                    <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
                </div>
                <div class="flexcenterbox" style="margin-bottom:16px;width:500px">
                    <span>生效日期：</span>
                    <el-date-picker v-model="addlonginsurehistorydate" @change="getaddlonginsurehistorylist"
                                    type="daterange" range-separator="至" start-placeholder="开始时间"
                                    end-placeholder="结束时间"/>
                </div>
                <el-table :data="addlonginsurehistorylist" style="width: 100%; margin-top: 0px" height="700"
                          :header-cell-style="{
                        background: '#FAFAFC',
                        color: '#202536',
                    }">
                    <el-table-column prop="operationType" label="操作类型">
                        <template #default="scope">
                            <div class="flexcenterbox" v-show="scope.row.operationType === 0"><span>加保</span>
                                <div class="oktag" v-show='scope.row.isSuccess === 1'>成功
                                </div>
                                <div class="notag" v-show='scope.row.isSuccess === 0'>未成功
                                </div>
                            </div>
                            <div class="flexcenterbox" v-show="scope.row.operationType === 1"><span>减保</span>
                                <div class="oktag" v-show='scope.row.isSuccess === 1'>成功
                                </div>
                                <div class="notag" v-show='scope.row.isSuccess === 0'>未成功
                                </div>
                            </div>
                            <div class="flexcenterbox" v-show="scope.row.operationType === 2"><span>撤销</span>
                                <div class="oktag" v-show='scope.row.isSuccess === 1'>成功
                                </div>
                                <div class="notag" v-show='scope.row.isSuccess === 0'>未成功
                                </div>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="total" label="人数"/>
                    <el-table-column prop="companyPlanName" label="方案名称"/>
                    <el-table-column prop="priceFour" label="方案类型">
                        <template #default="scope">
                            <span v-show="scope.row.type === 1">微保</span>
                            <span v-show="scope.row.type === 2">日日保</span>
                            <span v-show="scope.row.type === 3">雇主险</span>
                            <span v-show="scope.row.type === 4">月保单</span>
                            <span v-show="scope.row.type === 5">即时生效</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="insurStartDate" label="生效时间"/>
                    <el-table-column prop="createTime" label="录入时间"/>
                    <el-table-column prop="managerName" label="录入人"/>
                    <el-table-column prop="msg" label="备注">
                        <template #default="scope">
                            <el-tooltip class="box-item" effect="dark" :content="scope.row.msg" placement="bottom-end">
                                <span>{{ scope.row.msg }}</span>
                            </el-tooltip>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作">
                        <template #default="scope">
                            <div>
                                <div style="margin-right:10px;font-size: 14px;" class="pointer blue"
                                     @click="checkinsureguaranteeslipdetailtcopen(scope.row)">详情
                                </div>
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <pagination :total="addlonginsurehistorytotal" :currentPage="addlonginsurehistorypageNum"
                            :pageSize="addlonginsurehistorypageSize" @SizeChange="changeaddlonginsurehistorypageSize"
                            @CurrentChange="changeaddlonginsurehistorypageNum">
                </pagination>
            </el-drawer>
        </div>
        <!-- 保单详情弹窗 -->
        <el-dialog v-model="checkinsureguaranteeslipdetailtc" title="加减保记录详情" top="8vh"
                   :width="isMobile ? '1540' : '80%'">
            <div class='checkinsureguaranteeslipdetailtctopbox'>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">派遣单位：</span>
                    <span class="lablecontent">{{ checkinsuredetailpqdw }}</span>
                </div>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">方案名称：</span>
                    <span class="lablecontent">{{ checkinsuredetailfamc }}</span>
                </div>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">方案编码：</span>
                    <span class="lablecontent">{{ checkinsuredetailfabm }}</span>
                </div>
            </div>
            <div class='checkinsureguaranteeslipdetailtctopbox'>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">风险类型：</span>
                    <span class="lablecontent">{{ checkinsuredetailfxlx }}</span>
                </div>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">投保日期：</span>
                    <span class="lablecontent">{{ checkinsuredetailtbrq }}</span>
                </div>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">生效日期：</span>
                    <span class="lablecontent">{{ checkinsuredetailsxrq }}</span>
                </div>
            </div>
            <div class='checkinsureguaranteeslipdetailtctopbox'>
                <div class="checkinsureguaranteeslipdetailtctopitem">
                    <span class="lable">工&emsp;&emsp;种：</span>
                    <span class="lablecontent">{{ checkinsuredetailgz }}</span>
                </div>
            </div>
            <el-table :data="checkinsureguaranteeslipdetlist" style="width: 100%; margin-top: 0px" height="500"
                      :header-cell-style="{
                    background: '#FAFAFC',
                    color: '#202536',
                }">
                <el-table-column align="center" prop="userName" label="投保人名称"/>
                <el-table-column align="center" prop="idCardNo" label="身份证号"/>
                <el-table-column align="center" prop="policyStatus" label="保单状态">
                    <template #default="scope">
                        <div class="blue" v-show="scope.row.policyStatus === 0">待生效
                        </div>
                        <div style="color:#FFA814;" v-show="scope.row.policyStatus === 1">保障中
                        </div>
                        <div style="color:#9497B1;" v-show="scope.row.policyStatus === 2">不在保
                        </div>
                    </template>
                </el-table-column>
            </el-table>
            <pagination :total="checkinsureguaranteeslipdetltotal" :currentPage="checkinsureguaranteeslipdetlpageNum"
                        :pageSize="checkinsureguaranteeslipdetlpageSize"
                        @SizeChange="changecheckinsureguaranteeslipdetlpageSize"
                        @CurrentChange="changecheckinsureguaranteeslipdetlpageNum">
            </pagination>
            <div class="flexcenterbox">
                <el-button class="my_btn" @click="operatestaffexport">导出
                </el-button>
                <el-button class="my_cancelbtn" @click="checkinsureguaranteeslipdetailtc = false">取消
                </el-button>
            </div>
        </el-dialog>
        <!-- 方案活动列表弹窗 -->
        <el-dialog v-model="insureplanactivitytc" title="方案活动列表" top="8vh" :width="isMobile ? '1540' : '80%'">
            <div class="insureplanactivitybox">
                <div class="left">
                    <el-table :data="insureplanactivitylist" style="width: 100%; margin-top: 0px" height="600"
                              :header-cell-style="{
                            background: '#FAFAFC',
                            color: '#202536',
                        }">
                        <el-table-column prop="insurCompanyPlanName" label="方案名称"/>
                        <el-table-column prop="updateTime" label="更新时间"/>
                        <el-table-column prop="price" label="3类价格">
                            <template #default="scope">
                                {{ scope.row.price === null ? '--' : scope.row.price }}
                            </template>
                        </el-table-column>
                        <el-table-column prop="priceFour" label="4类价格">
                            <template #default="scope">
                                {{ scope.row.priceFour === null ? '--' : scope.row.priceFour }}
                            </template>
                        </el-table-column>
                        <el-table-column prop="priceFive" label="5类价格">
                            <template #default="scope">
                                {{ scope.row.priceFive === null ? '--' : scope.row.priceFive }}
                            </template>
                        </el-table-column>
                        <el-table-column prop="activityStartTime" label="活动开始时间"/>
                        <el-table-column prop="activityEndTime" label="活动结束时间"/>
                        <el-table-column prop="managerName" label="操作">
                            <template #default="scope">
                                <span class="blue pointer" @click="changeinsureplanactivity(scope.row)">修改</span>
                            </template>
                        </el-table-column>
                    </el-table>
                    <pagination :total="insureplanactivitytotal" :currentPage="insureplanactivitypagenum"
                                :pageSize="insureplanactivitypagesize" @SizeChange="changeinsureplanactivitypagesize"
                                @CurrentChange="changeinsureplanactivitypagenum">
                    </pagination>
                </div>
                <div class="right">
                    <div class="righttitle">{{
                            isaddinsureplanactiveflag === true ? '新增公司方案活动' : '修改公司方案活动'
                        }}
                    </div>
                    <div class="rightform">
                        <div class="formitem">
                            <div class="lable">公司名称：&emsp;&emsp;</div>
                            <div class="lablecontent">
                                {{ insurecompanyplanactivecompanyname }}
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable">方案名称：&emsp;&emsp;</div>
                            <div class="lablecontent">
                                {{ insurecompanyplanactiveplanname }}
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable">3类价格：&emsp;&emsp;</div>
                            <div class="lablecontent">
                                <el-input v-model="planactivitypricethree" placeholder="请输入"/>
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable">4类价格：&emsp;&emsp;</div>
                            <div class="lablecontent">
                                <el-input v-model="planactivitypricefour" placeholder="请输入"/>
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable">活动开始时间：</div>
                            <div class="lablecontent">
                                <el-date-picker value-format="YYYY-MM-DD" v-model="planactivitystarttime" type="date"
                                                placeholder="开始时间"/>
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable">活动结束时间：</div>
                            <div class="lablecontent">
                                <el-date-picker value-format="YYYY-MM-DD" v-model="planactivityendtime" type="date"
                                                placeholder="结束时间"/>
                            </div>
                        </div>
                        <div class="flexcenterbox" style="margin-bottom:20px;">
                            <el-button class="my_cancelbtn" @click="changeactivecancale">取消
                            </el-button>
                            <el-button class="my_btn" @click="changeactivesure">確定
                            </el-button>
                        </div>
                    </div>
                </div>
            </div>
        </el-dialog>
        <!-- 子弹发薪弹充值出框 -->
        <el-dialog :width="isMobile ? '580' : '30%'" v-model="dialogbulletVisible"
                   :title="companyName + '子弹发薪充值窗口'">
            <el-form ref="rechargebullruleFormRef" :model="bullruleFormrecharge" :rules="rechargebullrules"
                     label-width="120px" class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="付款方式" prop="paytype">
                    <el-select v-model="bullruleFormrecharge.paytype" @change='changebullpaytype'
                               placeholder="请选择付款方式">
                        <el-option label="公对公" :value="1"/>
                        <el-option label="扫码" :value="2"/>
                        <el-option label="私对公" :value="3"/>
                        <el-option label="赠送" :value="4"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="销售场景" prop="Salesscenario">
                    <el-select v-model="bullruleFormrecharge.Salesscenario" placeholder="请选择销售场景">
                        <el-option v-if="bullruleFormrecharge.paytype === 4" label="产品" value="1"/>
                        <el-option v-if="bullruleFormrecharge.paytype === 4" label="席位" value="2"/>
                        <el-option v-if="bullruleFormrecharge.paytype === 4" label="产品+席位" value="3"/>
                        <el-option v-if="bullruleFormrecharge.paytype !== 4" label="首签" value="0"/>
                        <el-option v-if="bullruleFormrecharge.paytype !== 4" label="续签" value="1"/>
                        <el-option v-if="bullruleFormrecharge.paytype !== 4" label="席位购买" value="2"/>
                        <el-option v-if="bullruleFormrecharge.paytype !== 4" label="续费+席位购买" value="3"/>
                        <el-option v-if="bullruleFormrecharge.paytype !== 4" label="首签+席位购买" value="4"/>
                    </el-select>
                </el-form-item>
                <el-form-item v-if='issendforfree' style="position: relative;" label="赠送时间" prop="Amountofservice">
                    <el-input type="number" style="width:200px;" @input="changesendfreetime"
                              v-model="bullruleFormrecharge.sendfreetime" placeholder="请输入赠送天数"/>
                    <div style="position: absolute;top:0;left:130px;">/天</div>
                </el-form-item>
                <el-form-item v-if='!issendforfree' label="服务金额" prop="Amountofservice">
                    <el-input-number v-model="bullruleFormrecharge.Amountofservice" :min="0" placeholder="请输入金额"/>
                </el-form-item>
                <div class="fc-red fs-18" v-if="bullruleFormrecharge.Amountofservice">
                    {{ convertCurrency(bullruleFormrecharge.Amountofservice) }}
                </div>
                <el-form-item v-if='!issendforfree' label="购买月份" prop="Purchasemonth">
                    <el-select v-model="bullruleFormrecharge.Purchasemonth" placeholder="请选择购买月份"
                               @change="buymounth">
                        <el-option label="1个月" value="1"/>
                        <el-option label="2个月" value="2"/>
                        <el-option label="3个月" value="3"/>
                        <el-option label="4个月" value="4"/>
                        <el-option label="5个月" value="5"/>
                        <el-option label="6个月" value="6"/>
                        <el-option label="7个月" value="7"/>
                        <el-option label="8个月" value="8"/>
                        <el-option label="9个月" value="9"/>
                        <el-option label="10个月" value="10"/>
                        <el-option label="11个月" value="11"/>
                        <el-option label="12个月" value="12"/>
                    </el-select>
                </el-form-item>
                <el-form-item
                    v-if="bullruleFormrecharge.Salesscenario === '2' || bullruleFormrecharge.Salesscenario === '3' || bullruleFormrecharge.Salesscenario === '4'"
                    :label="issendforfree ? '赠送席位' : '另购席位'" prop="seatnum">
                    <el-input-number v-model="bullruleFormrecharge.seatnum" :min="1" placeholder="请输入席位数量"/>
                </el-form-item>
                <el-form-item
                    v-if="bullruleFormrecharge.Salesscenario === '0' || bullruleFormrecharge.Salesscenario === '1' || bullruleFormrecharge.Salesscenario === '3' || bullruleFormrecharge.Salesscenario === '4'"
                    label="产品过期时间" prop="date">
                    <el-date-picker v-model="bullruleFormrecharge.date" type="date" placeholder="过期时间"/>
                </el-form-item>
                <el-form-item
                    v-if="bullruleFormrecharge.Salesscenario === '2' || bullruleFormrecharge.Salesscenario === '3' || bullruleFormrecharge.Salesscenario === '4'"
                    label="席位过期时间" prop="xwdate">
                    <el-date-picker v-model="bullruleFormrecharge.xwdate" type="date" placeholder="过期时间"/>
                </el-form-item>
                <el-form-item label="收款账户" prop="accounttobecredited">
                    <el-select v-model="bullruleFormrecharge.accounttobecredited" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item v-if="bullruleFormrecharge.paytype !== 4" label="上传凭证">
                    <el-upload ref="bullpayuploadRef" class="upload-demo" :file-list="bullpayfileList"
                               :on-change="bullpayonChange" accept=".png,.jpeg,.jpg" :limit="1" :auto-upload="false">
                        <template #trigger>
                            <el-button type="primary" class="my_btn">选择文件
                            </el-button>
                        </template>
                        <template #tip>
                            <div class="el-upload__tip">
                                大小限制5MB，支持png、jpeg、jpg格式文件
                            </div>
                        </template>
                    </el-upload>
                </el-form-item>
                <el-form-item label="备注" prop="remark">
                    <el-input v-model="bullruleFormrecharge.remark" :rows="2" type="textarea" placeholder="请输入备注"/>
                </el-form-item>
                <!-- <div>
            <div style="width: 100px; height: auto; position: relative">
              <span v-show="payimg" style="
                  position: absolute;
                  right: -10px;
                  top: -10px;
                  background-color: rgba(86, 88, 104, 1);
                  color: white;
                  width: 20px;
                  height: 20px;
                  line-height: 20px;
                  text-align: center;
                  border-radius: 50%;
                  cursor: pointer;
                " @click="delchoosefile">x</span>
              <img crossorigin="anonymous" :src="payimg" alt="" style="width: 100%" />
            </div>
            <div>
              <input type="file" ref="fileInput" @change="handleFileChange" />
              <div></div>
            </div>
          </div> -->
            </el-form>
            <template #footer>
                <span class="dialog-footer" style="display: flex; align-items: center; justify-content: center">
                    <el-button class="my_cancelbtn"
                               @click="rechargebullresetForm(rechargebullruleFormRef)">取消</el-button>
                    <el-button type="primary" @click="rechargebullsubmitForm(rechargebullruleFormRef)"
                               class="my_btn">确定</el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 长期保充值弹出框 -->
        <el-dialog :width="isMobile ? '580' : '30%'" v-model="dialoglongVisible"
                   :title="companyName + '长期保充值窗口'">
            <el-form ref="longpayruleFormRef" :model="longpayruleForm" :rules="longpayrules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="充值金额" prop="rechargeAmount">
                    <el-input-number v-model="longpayruleForm.rechargeAmount" placeholder="请输入金额"/>
                </el-form-item>
                <el-form-item label="收款账户" prop="receiptId">
                    <el-select v-model="longpayruleForm.receiptId" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="付款方式" prop="payMode">
                    <el-select v-model="longpayruleForm.payMode" placeholder="请选择付款方式">
                        <el-option label="公对公" :value="1"/>
                        <el-option label="扫码" :value="2"/>
                        <el-option label="私对公" :value="3"/>
                        <el-option label="赠送" :value="4"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-upload ref="longpayuploadRef" class="upload-demo" :file-list="longpayfileList"
                               :on-change="longpayonChange" accept=".png,.jpeg,.jpg" :limit="1" :auto-upload="false">
                        <template #trigger>
                            <el-button type="primary" class="my_btn">选择文件
                            </el-button>
                        </template>
                        <template #tip>
                            <div class="el-upload__tip">
                                大小限制5MB，支持png、jpeg、jpg格式文件
                            </div>
                        </template>
                    </el-upload>
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer" style="display: flex; align-items: center; justify-content: center">
                    <el-button class="my_cancelbtn" @click="longpayresetForm(longpayruleFormRef)">取消</el-button>
                    <el-button class="my_btn" @click="longpaysubmitForm(longpayruleFormRef)" type="primary"
                               style="background-color: #0256ff">确定</el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 日日保充值弹出框 -->
        <el-dialog :width="isMobile ? '580' : '30%'" v-model="dialogeveryVisible"
                   :title="companyName + '日日保充值窗口'">
            <el-form ref="everypayruleFormRef" :model="everyrpayuleForm" :rules="everypayrules" label-width="120px"
                     class="demo-ruleForm" status-icon label-position="top">
                <el-form-item label="充值金额" prop="rechargeAmount">
                    <el-input-number v-model="everyrpayuleForm.rechargeAmount" placeholder="请输入金额"/>
                </el-form-item>
                <el-form-item label="收款账户" prop="receiptId">
                    <el-select v-model="everyrpayuleForm.receiptId" placeholder="请选择收款账户">
                        <el-option v-for="item in skzhlist" :key="item.id" :label="item.bankName" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="付款方式" prop="payMode">
                    <el-select v-model="everyrpayuleForm.payMode" placeholder="请选择付款方式">
                        <el-option label="公对公" :value="1"/>
                        <el-option label="扫码" :value="2"/>
                        <el-option label="私对公" :value="3"/>
                        <el-option label="赠送" :value="4"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="上传凭证">
                    <el-upload ref="daypayuploadRef" class="upload-demo" :file-list="daypayfileList"
                               :on-change="daypayonChange" accept=".png,.jpeg,.jpg" :limit="1" :auto-upload="false">
                        <template #trigger>
                            <el-button type="primary" class="my_btn">选择文件
                            </el-button>
                        </template>
                        <template #tip>
                            <div class="el-upload__tip">
                                大小限制5MB，支持png、jpeg、jpg格式文件
                            </div>
                        </template>
                    </el-upload>
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer" style="display: flex; align-items: center; justify-content: center">
                    <el-button class="my_cancelbtn" @click="everypayresetForm(everypayruleFormRef)">取消</el-button>
                    <el-button class="my_btn" @click="everypaysubmitForm(everypayruleFormRef)" type="primary"
                               style="background-color: #0256ff">确定</el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 长期保派遣单位审批通过弹窗（取消拒保同一个） -->
        <el-dialog v-model="dialogcheckpqdwokVisible" title="审批派遣单位" :width="isMobile ? '1540' : '80%'" top="7vh">
            <div class="dialogcheckpqdwokVisibletop">
                <div class="flexbox topitem">
                    <div class="area">地区</div>
                    <el-select clearable v-model="tbsharea" style="width:150px" filterable placeholder="请选择">
                        <el-option v-for="item in provincelist" :key="item.value" :label="item.label"
                                   :value="item.value"/>
                    </el-select>
                </div>
                <div class="flexbox topitem">
                    <div class="area">特别约定</div>
                    <el-input clearable style="width: 184px;" v-model="tbyd" placeholder="选填"
                              class="input-with-select">
                    </el-input>
                </div>
            </div>
            <div class="dialogcheckpqdwokVisiblecontent">
                <div class="lcontent">
                    <div class="ipt">
                        <el-input v-model="jobtypekey" placeholder="请输入" class="input-with-select">
                            <template #prepend>
                                <el-button :icon="Search"/>
                            </template>
                        </el-input>
                    </div>
                    <div class="tabbox">
                        <div class="tab">
                            <div v-show="ele.name.includes(jobtypekey)"
                                 :class="{ tabitem: true, jobtabactive: jobtabflag === i }"
                                 @click="changejobtab(i, ele.id)" v-for="(ele, i) in joblist" :key="i">{{
                                    ele.name
                                }}
                            </div>
                        </div>
                        <div class="tabcontent">
                            <el-checkbox-group v-model="longjobcheckList" @change="change">
                                <div class="columnflex">
                                    <el-checkbox v-show="jobtabid === ele.periodIndustryId"
                                                 v-for="(ele, i) in jobinfolist" :key="i" :label="ele">{{
                                            ele.name
                                        }}（<span>{{
                                                ele.level
                                            }}类）</span></el-checkbox>
                                </div>
                            </el-checkbox-group>
                        </div>
                    </div>
                </div>
                <div class="rcontent">
                    <div class="topnum">已选中<span class="blue">{{ longjobcheckList.length }}项</span></div>
                    <div class="jobselected">
                        <div class="selectjobitem" v-for="(ele, index) in longjobcheckList" :key="index">
                            <img src="../../assets/image/拖动排序.png" alt="">
                            <div class="jobname">{{ ele.name }}（<span>{{ ele.level }}类）</span></div>
                            <img @click="delselectedlongjob(index)" src="../../assets/image/图标.png" alt="">
                        </div>
                    </div>
                </div>
            </div>
            <div class="dialogcheckpqdwokVisiblebtn">
                <el-button class="my_cancelbtn" @click="longservicecompanycancel">取消
                </el-button>
                <el-button class="my_btn" @click="longservicecompanysure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 长期保派遣单位审批驳回弹窗 -->
        <el-dialog v-model="dialogbhVisible" title="驳回理由" width="515">
            <el-input v-model="bhtextarea" maxlength="100" placeholder="请输入驳回理由" show-word-limit
                      type="textarea"/>
            <div class="flexcenterbox" style="margin-top: 28px;">
                <el-button class="my_cancelbtn" @click="longbhcancel">取消
                </el-button>
                <el-button class="my_btn" @click="longbhsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 长期保派遣单位审批拒保弹窗 -->
        <el-dialog v-model="dialogjbVisible" title="拒保理由" width="515">
            <el-input v-model="jbtextarea" maxlength="100" placeholder="请输入拒保理由" show-word-limit
                      type="textarea"/>
            <div class="flexcenterbox" style="margin-top:40px;">
                <el-button class="my_cancelbtn" @click="longrejectcancel">取消
                </el-button>
                <el-button class="my_btn" @click="longrejectsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 查看视频弹窗 -->
        <el-dialog v-model="diavideoVisible" title="" top="10vh" :width="isMobile ? '960' : '50%'">
            <h3 class="flexcenterbox">{{ atpresent + 1 }}/{{ videolist.length }}</h3>
            <div class="videobox">
                <div class="lbtn">
                    <img @click="prev" src="../../assets/image/lbtn.png" alt="">
                </div>
                <div v-show="atpresent === index" class="video" style="height: 600px;" v-for="(ele, index) in videolist"
                     :key="index">
                    <video style="height: 600px;width: 100%;" crossorigin="anonymous" :src="ele" autoplay loop
                           controls></video>
                </div>
                <div class="rbtn">
                    <img @click="next" src="../../assets/image/rbtn.png" alt="">
                </div>
            </div>
        </el-dialog>
        <!-- 长期保添加视频接口 -->
        <el-dialog v-model="dialogaddvideoVisible" title="添加视频" width="600">
            <el-upload ref="uploadEle" class="upload-demo" :auto-upload="true" accept=".mp4" drag
                       :http-request="uploadAction" :before-upload="beforeUpload" :on-exceed="handleExceed"
                       :action="baseurl + 'rest/period-insur/serve-company/upload'" :limit="1" :multiple="false">
                <img src="../../assets/image/uploadvideo.png" alt="">
                <div class="el-upload__text">
                    将文件拖到此处，或<em>点击上传</em>
                </div>
            </el-upload>
            <div class="flexendbox">
                <el-button class="my_cancelbtn" @click="longaddvideocancel">取消
                </el-button>
                <el-button class="my_btn" @click="longaddvideosure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 长期保上传发票接口 -->
        <el-dialog v-model="uploadfptc" title="上传发票" width="600">
            <el-upload ref="uploadfp" class="upload-demo" :auto-upload="false" drag :before-upload="beforeUploadfp"
                       :file-list="fileList" :on-change="onChange"
                       :headers="{ Authorization: 'BackstageBearer ' + token }"
                       :before-remove="beforeRemove" :action="baseurl + '/saas/invoice/upload?id=' + uploadfpid"
                       :limit="1"
                       :multiple="false">
                <img src="../../assets/image/uploadvideo.png" alt="">
                <div class="el-upload__text">
                    将文件拖到此处，或<span class="blue">点击上传</span>
                </div>
            </el-upload>

            <div class="flexendbox">
                <el-button class="my_cancelbtn" @click="uploadfpcancel">取消
                </el-button>
                <el-button class="my_btn" @click="uploadfpsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 日日保上传发票接口 -->
        <el-dialog v-model="dayuploadfptc" title="上传发票" width="600">
            <el-upload ref="dayuploadfp" class="upload-demo" :auto-upload="false" drag
                       :before-upload="daybeforeUploadfp" :file-list="dayfileList" :on-change="onChange"
                       :headers="{ Authorization: 'BackstageBearer ' + token }" :before-remove="daybeforeRemove"
                       :action="baseurl + '/saas/invoice/upload?id=' + uploadfpid" :limit="1" :multiple="false">
                <img src="../../assets/image/uploadvideo.png" alt="">
                <div class="el-upload__text">
                    将文件拖到此处，或<span class="blue">点击上传</span>
                </div>
            </el-upload>
            <div class="flexendbox">
                <el-button class="my_cancelbtn" @click="dayuploadfpcancel">取消
                </el-button>
                <el-button class="my_btn" @click="dayuploadfpsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 发票列表上传发票接口 -->
        <el-dialog v-model="invoicelistuploadtc" title="上传发票" width="600">
            <el-upload ref="invoicelistuploadtcref" class="upload-demo" :auto-upload="false" drag
                       :before-upload="invoicerlistbeforeUploadfp" :file-list="invoicefileList"
                       :on-change="invoicelistonChange" :headers="{ Authorization: 'BackstageBearer ' + token }"
                       :before-remove="invoicelistbeforeRemove"
                       :action="baseurl + '/saas/invoice/upload?id=' + uploadlonginvoiceid" :limit="1"
                       :multiple="false">
                <img src="../../assets/image/uploadvideo.png" alt="">
                <div class="el-upload__text">
                    将文件拖到此处，或<span class="blue">点击上传</span>
                </div>
            </el-upload>
            <div class="flexendbox">
                <el-button class="my_cancelbtn" @click="invoicelistuploadfpcancel">取消
                </el-button>
                <el-button class="my_btn" @click="invoicelistuploadfpsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 批量发票列表上传发票接口 -->
        <el-dialog v-model="moreinvoicelistuploadtc" title="上传发票" width="600">
            <el-upload ref="moreinvoicelistuploadtcref" class="upload-demo" accept=".zip" :auto-upload="false" drag
                       :before-upload="moreinvoicerlistbeforeUploadfp" :on-error="handleUploadError"
                       :file-list="moreinvoicefileList" :on-change="moreinvoicelistonChange"
                       :headers="{ Authorization: 'BackstageBearer ' + token }"
                       :before-remove="moreinvoicelistbeforeRemove"
                       :action="baseurl + '/saas/invoice/uploadZip-old?id=0'" :limit="1" :multiple="false">
                <img src="../../assets/image/uploadvideo.png" alt="">
                <div class="el-upload__text">
                    将文件拖到此处，或<span class="blue">点击上传</span>
                </div>
                <div class="red">批量上传电子签发票文件名格式：电子签__年-月.zip；如：电子签__2022-01.zip
                    批量上传日日保发票文件名格式：日日保__年-月.zip；如：日日保__2022-01.zip
                </div>
            </el-upload>
            <div class="flexendbox">
                <el-button class="my_cancelbtn" @click="moreinvoicelistuploadfpcancel">取消
                </el-button>
                <el-button class="my_btn" @click="moreinvoicelistuploadfpsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 发票列表弹窗 -->
        <div class="yjxb" v-show="allinvoicelisttc">
            <el-drawer v-model="allinvoicelisttc" class="addinsuredrawer" title="发票列表" direction="rtl"
                       :size="isMobile ? '100%' : '80%'">
                <div class="invoiceclosedrawer" @click="closeallinvoicelisttc">
                    <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
                </div>
                <div class="invoicetcboxtoptab">
                    <div class="invoicetab">
                        <div :class="{ pointer: true, tabitem: true, activeinvoicetab: invoicetabflag === 0 }"
                             @click="changeinvocetab(0)">未上传
                        </div>
                        <div :class="{ pointer: true, tabitem: true, activeinvoicetab: invoicetabflag === 1 }"
                             @click="changeinvocetab(1)">已上传
                        </div>
                    </div>
                    <div v-show="invoicetabflag === 0" class="flexcenterbox">
                        <div class="clear" @click="moreinvoicelistuploadtcopen">
                            <img src="../../assets/image/aaa.png" alt="">
                            <span>上传</span>
                        </div>
                        <div class="clear" @click="invoiceexportallfnno">
                            <img src="../../assets/image/Share.png" alt="">
                            <span>导出</span>
                        </div>
                    </div>
                    <div v-show="invoicetabflag === 1" class="flexcenterbox">
                        <div class="clear" @click="invoiceexportallfnok">
                            <img src="../../assets/image/Share.png" alt="">
                            <span>导出</span>
                        </div>
                    </div>
                </div>
                <div v-show="invoicetabflag === 0">
                    <div class="formcontent">
                        <div class="formitem">
                            <div class="lable">所属业务员：</div>
                            <el-select clearable @change="getnoallinvoicelist" style="margin-right: 16px;"
                                       v-model="nosalesname" placeholder="请选择销售">
                                <el-option v-for="item in allseller" :key="item.saleName" :label="item.saleName"
                                           :value="item.saleId"/>
                            </el-select>
                            <div class="lable">收款账户：</div>
                            <el-select clearable @change="getnoallinvoicelist" style="margin-right: 16px;"
                                       v-model="noreceiptIds" multiple collapse-tags collapse-tags-tooltip
                                       placeholder="请选择收款账户（可多选）">
                                <el-option v-for="item in alladdmin" :key="item.value" :label="item.bankName"
                                           :value="item.id"/>
                            </el-select>
                            <div class="lable">发票月份：</div>
                            <el-date-picker clearable @change="getnoallinvoicelist" style="margin-right: 16px;"
                                            v-model="nomonth" type="month" value-format="YYYY-MM"
                                            placeholder="请选择发票月份"/>
                            <div class="lable">申请月份：</div>
                            <el-date-picker clearable @change="getnoallinvoicelist" style="margin-right: 16px;"
                                            v-model="noapplicationMonth" type="month" value-format="YYYY-MM"
                                            placeholder="请选择申请月份"/>
                        </div>
                        <div class="formitem">
                            <div class="lable">发票类型：</div>
                            <el-select clearable @change="getnoallinvoicelist" style="margin-right: 16px;"
                                       v-model="notype" class="m-2" placeholder="请选择发票类型">
                                <el-option label="日日保" value="0"/>
                                <el-option label="长期保" value="3"/>
                            </el-select>
                        </div>
                    </div>
                    <el-table :data="notabledate" style="width: 100%" :header-cell-style="{
                        background: '#FAFAFC',
                        color: '#202536',
                    }">
                        <el-table-column prop="month" label="发票月份"/>
                        <el-table-column prop="type" label="发票类型">
                            <template #default="scope">
                                <div v-show="scope.row.type === 0">国寿财</div>
                                <div v-show="scope.row.type === 3">长期保</div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="applyTime" label="申请时间"/>
                        <el-table-column prop="amount" label="发票金额" width="150">
                            <template #default="scope">
                                <div>
                                    <span class="orign">￥{{ scope.row.amount }}</span>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="salesName" label="所属业务员"/>
                        <el-table-column prop="bankName" label="收款账户"/>
                        <el-table-column prop="amount" label="充值金额" width="150">
                            <template #default="scope">
                                <div>
                                    <span class="orign">￥{{ scope.row.rechargeAmount }}</span>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作">
                            <template #default="scope">
                                <div class="blue pointer" @click="uploadinvoice(scope.row)">
                                    上传发票
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    <pagination :total="nototal" :currentPage="nopagenum" :pageSize="nopagesize"
                                @SizeChange="changenopagesize" @CurrentChange="changenopagenum"></pagination>
                </div>
                <div v-show="invoicetabflag === 1">
                    <div class="formcontent">
                        <div class="formitem">
                            <div class="lable">所属业务员：</div>
                            <el-select clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                       v-model="oksalesname" placeholder="请选择销售">
                                <el-option v-for="item in allseller" :key="item.saleName" :label="item.saleName"
                                           :value="item.saleId"/>
                            </el-select>
                            <div class="lable">收款账户：</div>
                            <el-select clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                       v-model="okreceiptIds" multiple collapse-tags collapse-tags-tooltip
                                       placeholder="请选择收款账户（可多选）">
                                <el-option v-for="item in alladdmin" :key="item.value" :label="item.bankName"
                                           :value="item.id"/>
                            </el-select>
                            <div class="lable">发票月份：</div>
                            <el-date-picker clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                            v-model="okmonth" type="month" value-format="YYYY-MM"
                                            placeholder="请选择发票月份"/>
                            <div class="lable">申请月份：</div>
                            <el-date-picker clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                            v-model="okapplicationMonth" type="month" value-format="YYYY-MM"
                                            placeholder="请选择申请月份"/>
                        </div>
                        <div class="formitem">
                            <div class="lable">开票月份：</div>
                            <el-date-picker clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                            v-model="okopenDay" type="month" value-format="YYYY-MM"
                                            placeholder="请选择开票月份"/>
                            <div class="lable">发票类型：</div>
                            <el-select clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                       v-model="oktype" class="m-2" placeholder="请选择发票类型">
                                <el-option label="日日保" value="0"/>
                                <el-option label="长期保" value="3"/>
                            </el-select>
                            <div class="lable">核对状态：</div>
                            <el-select clearable @change="getokallinvoicelist" style="margin-right: 16px;"
                                       v-model="okcheckStatus" class="m-2" placeholder="请选择核对状态">
                                <el-option label="正常" value="0"/>
                                <el-option label="异常" value="1"/>
                                <el-option label="待核对" value="2"/>
                            </el-select>
                        </div>
                    </div>
                    <el-table :data="oktabledate" style="width: 100%" :header-cell-style="{
                        background: '#FAFAFC',
                        color: '#202536',
                    }">
                        <el-table-column prop="month" label="发票月份"/>
                        <el-table-column prop="type" label="发票类型">
                            <template #default="scope">
                                <div v-show="scope.row.type === 0">国寿财</div>
                                <div v-show="scope.row.type === 3">长期保</div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="applyTime" label="申请时间"/>
                        <el-table-column prop="amount" label="发票金额">
                            <template #default="scope">
                                <div>
                                    <span class="orign">￥{{ scope.row.amount }}</span>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="salesName" label="所属业务员"/>
                        <el-table-column prop="bankName" label="收款账户"/>
                        <el-table-column prop="rechargeAmount" label="充值金额">
                            <template #default="scope">
                                <div>
                                    <span class="orign">￥{{ scope.row.rechargeAmount }}</span>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="uploadTime" label="上传日期"/>
                        <el-table-column prop="checkStatus" label="核对状态">
                            <template #default="scope">
                                <div v-show="scope.row.checkStatus === 0" class="pointer">正常
                                </div>
                                <el-tooltip class="box-item" effect="dark" content="异常原因：发票金额不符"
                                            placement="bottom">
                                    <div v-show="scope.row.checkStatus === 1" class="orign pointer">异常
                                    </div>
                                </el-tooltip>
                                <div v-show="scope.row.checkStatus === 2" class="pointer">待核对
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column label="开票日期">
                            <template #default="scope">
                                <div v-if="scope.row.checkStatus === 0">
                                    {{ scope.row.uploadTime }}
                                </div>
                                <div v-else>
                                    --
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="area" label="操作">
                            <template #default="scope">
                                <div class="flexcenterbox">
                                    <div class="blue pointer" @click="lookfp(scope.row)" style="margin-right:10px;">
                                        查看发票
                                    </div>
                                    <div class="blue pointer" @click="uploadinvoice(scope.row)">
                                        编辑
                                    </div>
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    <pagination :total="oktotal" :currentPage="okpagenum" :pageSize="okpagesize"
                                @SizeChange="changeokpagesize" @CurrentChange="changeokpagenum"></pagination>
                </div>
            </el-drawer>
        </div>
        <!-- 日日保保理赔率弹窗 -->
        <el-dialog v-model="Rateofclaimtc" title="理赔率" width="600">
            <div class="dayRateofclaimtctable">
                <div class="tr">
                    <div class="td">总保费：</div>
                    <div class="td td_content">{{ Rateofclaimmsg.totalPrice }}</div>
                    <div class="td">案件数：</div>
                    <div class="td td_content">{{ Rateofclaimmsg.caseAmount }}</div>
                </div>
                <div class="tr">
                    <div class="td">已结案金额：</div>
                    <div class="td td_content">{{ Rateofclaimmsg.overCaseMoney }}</div>
                    <div class="td">未结案金额：</div>
                    <div class="td td_content">{{ Rateofclaimmsg.estimateMoney }}</div>
                </div>
                <div class="tr">
                    <div class="td">理赔率：</div>
                    <div class="td maxcontent" style="display:flex;align-items:center;justify-content:space-between">
                        <span>{{ Rateofclaimmsg.claimRate }} </span>
                    </div>
                </div>
            </div>
        </el-dialog>
        <!-- 长期保账户设置弹窗 -->
        <el-dialog v-model="longsetadmintc" title="账户设置" width="293">
            <div class="switchbox">
                <div class="switchitem">
                    <div class="switchlable">
                        <div><span class="red">*</span>拒保：&emsp;&emsp;</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch @change="changedayblackvalue" v-model="dayclockvalue" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
                <div class="switchitem">
                    <div class="switchlable">
                        <div><span class="red">*</span>冻结账户：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch @change="changedayclockvalue" v-model="dayblackvalue" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
                <div class="switchitem">
                    <div class="switchlable">
                        <div><span class="red">*</span>倒投保：&emsp;</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch v-model="daydtbvalue" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-top:16px;">
                <el-button class="my_cancelbtn" @click="longsetadmincancel">取消
                </el-button>
                <el-button class="my_btn" @click="longsetadminsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 日日保派遣单位审批修改行业弹窗 -->
        <el-dialog v-model="dialogdaychangehyVisible" title="修改行业" width="515">
            <span style="margin-right:10px;font-weight: 700;">行业</span>
            <el-select style="width:400px" v-model="dayhy" multiple filterable allow-create default-first-option
                       :reserve-keyword="false" placeholder="请选择行业">
                <el-option v-for="item in dayhylist" :key="item.id" :label="item.industryName" :value="item.id"/>
            </el-select>
            <div class="flexcenterbox" style="margin-top:20px">
                <el-button class="my_cancelbtn" @click="changedayhycancel">取消
                </el-button>
                <el-button class="my_btn" @click="changedayhyok">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 团意保派遣单位审批修改行业弹窗 -->
        <el-dialog v-model="dialogteamchangehyVisible" title="修改行业" width="515">
            <span style="margin-right:10px;font-weight: 700;">行业</span>
            <el-select style="width:400px" v-model="teamhy" multiple filterable allow-create default-first-option
                       :reserve-keyword="false" placeholder="请选择行业">
                <el-option v-for="item in teamhylist" :key="item.id" :label="item.industryName" :value="item.id"/>
            </el-select>
            <div class="flexcenterbox" style="margin-top:20px">
                <el-button class="my_cancelbtn" @click="changeteamhycancel">取消
                </el-button>
                <el-button class="my_btn" @click="changeteamhyok">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 日日保保单详情弹窗 -->
        <el-dialog v-model="dayinsuredetailtc" title="保单详情" :width="isMobile ? '1340' : '70%'">
            <div class="dayinsurebasemsgbox" style="padding-top:25px;border-top:1px solid #F4F4F7">
                <div class="dayinsurebasemsgboxitem">
                    <div class="lable">派遣单位：</div>
                    <div class="lablecontent">{{ dayinsuredetailservicecompanyname }}</div>
                </div>
                <div class="dayinsurebasemsgboxitem">
                    <div class="lable">保&emsp;&emsp;司：</div>
                    <div class="lablecontent">{{ dayinsuredetailinsurecomapnyname }}</div>
                </div>
                <div class="dayinsurebasemsgboxitem">
                    <div class="lable">投保人数：</div>
                    <div class="lablecontent">{{ dayinsuredetailuseinsurenum }}</div>
                </div>
            </div>
            <div class="dayinsurebasemsgbox" style="padding-bottom: 10px;">
                <div class="dayinsurebasemsgboxitem">
                    <div class="lable">方案名称：</div>
                    <div class="lablecontent">{{ dayinsuredetailplanname }}</div>
                </div>
                <div class="dayinsurebasemsgboxitem">
                    <div class="lable">方案编码：</div>
                    <div class="lablecontent">{{ dayinsuredetailplancode }}</div>
                </div>
                <div class="dayinsurebasemsgboxitem">
                    <div class="lable">投保日期：</div>
                    <div class="lablecontent">{{ dayinsuredetailuseinsuredate }}</div>
                </div>
            </div>
            <el-table :data="dayinsuredetaillist" style="width: 100%; margin-top: 0" :header-cell-style="{
                background: '#FAFAFC',
                color: '#202536',
            }">
                <el-table-column prop="userName" label="投保人名称"/>
                <el-table-column prop="idCardNo" label="身份证号"/>
                <el-table-column label="保单状态">
                    <template #default="scope">
                        <span style="color:#9497B1" v-show="scope.row.policyStatus % 1000 === 0">未投保</span>
                        <span style="color:#FFA814" v-show="scope.row.policyStatus % 1000 === 1">出单中</span>
                        <span style="color:#00D679" v-show="scope.row.policyStatus % 1000 === 2">待生效</span>
                        <span style="color:#3E5FF5" v-show="scope.row.policyStatus % 1000 === 3">保障中</span>
                        <span style="color:#9497B1" v-show="scope.row.policyStatus % 1000 === 4">已失效</span>
                        <span style="color:#FF7642" v-show="scope.row.policyStatus % 1000 === 5">投保失败</span>
                        <span style="color:#9497B1" v-show="scope.row.policyStatus % 1000 === 6">取消</span>
                        <span style="color:#9497B1" v-show="scope.row.policyStatus % 1000 === 7">过期</span>
                    </template>
                </el-table-column>
            </el-table>
            <div class="flexcenterbox" style="margin-top:24px">
                <el-button class="my_btn" @click="exportinsuredetail">导出
                </el-button>
                <el-button class="my_cancelbtn" @click="dayinsuredetailtc = false">取消
                </el-button>
            </div>
        </el-dialog>
        <el-dialog v-model="centerDialogVisible" title="提示" :width="isMobile ? '580' : '30%'" center>
            <span>
                {{ falidescription }}
            </span>
            <template #footer>
                <span class="dialog-footer">
                    <el-button type="primary" class="my_btn" @click="centerDialogVisible = false">
                        确定
                    </el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 驳回 -->
        <el-dialog v-model="reject" title="驳回原因" :width="isMobile ? '580' : '30%'">
            <el-input v-model="Causeofrejection" maxlength="50" show-word-limit type="textarea"
                      placeholder="请输入备注"/>
            <template #footer>
                <span class="dialog-footer" style="display: flex; align-items: center; justify-content: center">
                    <el-button @click="bhcancel">取消</el-button>
                    <el-button type="primary" style="background-color: #0256ff" @click="bhok">
                        确定
                    </el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 日日保提现 -->
        <el-dialog v-model="daytxtc" :title="companyName + '提现窗口'" width="500">
            <div class="txformitem">
                <div class="lable">提现金额</div>
                <div class="lablecontent">
                    <el-input-number style='width:70%;' v-model="daynum" placeholder="请输入金额" :precision="2"
                                     :min="0"
                                     :step="1" :max="daytczhye"/>
                    <div class="blue pointer" style="margin-left:6px;" @click='dattxall'>全部提现
                    </div>
                </div>
            </div>
            <div class="txinfo">
                <div class="txinfoitem">
                    <div class="lable">账号余额：</div>
                    <div class="lablecontent">{{ daytczhye }}</div>
                </div>
                <!-- <div class="txinfoitem">
          <div class="lable">明日保费需扣金额：</div>
          <div class="lablecontent">111</div>
        </div> -->
            </div>
            <div class="txformitem">
                <div class="lable">备注</div>
                <div class="lablecontent">
                    <el-input v-model="daytxremark" placeholder="请输入备注"/>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-top:20px">
                <el-button class="my_cancelbtn" @click="daytxacncel">取消
                </el-button>
                <el-button class="my_btn" @click="daytxsure">确定
                </el-button>
            </div>
        </el-dialog>
        <!-- 长期保提现 -->
        <el-dialog v-model="longtxtc" :title="companyName + '提现窗口'" width="500">
            <div class="txformitem">
                <div class="lable">提现金额</div>
                <div class="lablecontent">
                    <el-input-number style='width:70%;' v-model="longnum" placeholder="请输入金额" :precision="2"
                                     :step="1"
                                     :min="0" :max="longtczhye"/>
                    <div class="blue pointer" style="margin-left:6px;" @click='longtxall'>全部提现
                    </div>
                </div>
            </div>
            <div class="txinfo">
                <div class="txinfoitem">
                    <div class="lable">账号余额：</div>
                    <div class="lablecontent">{{ longtczhye }}</div>
                </div>
                <div class="txinfoitem">
                    <div class="lable">明日保费需扣金额：</div>
                    <div class="lablecontent">{{ longtomorrowprice }}</div>
                </div>
            </div>
            <div class="txformitem">
                <div class="lable">备注</div>
                <div class="lablecontent">
                    <el-input v-model="longtxremark" placeholder="请输入备注"/>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-top:20px">
                <el-button class="my_cancelbtn" @click="longtxacncel">取消
                </el-button>
                <el-button class="my_btn" @click="longtxsure">确定
                </el-button>
            </div>
        </el-dialog>
        <previewDialog v-model:show="showPreview" v-model:url="previewUrl"/>
        <el-drawer v-model="eleczxfjltcflag" class="drawerele" title="充值消费记录" direction="rtl"
                   :size="isMobile ? '100%' : '50%'">
            <div class="closedrawer" @click="eleczxfjltcflag = false">
                <span>收</span><span>起</span><img src="../../assets/image/组355.png" alt=""/>
            </div>
            <div class="drawerelecontent">
                <div class="top">
                    <div class="select">
                        <div class="lable">操作类型</div>
                        <el-select v-model="elexfjltype" placeholder="请选择" @change="getqueryaccountrecord">
                            <el-option label="消费" value="0"/>
                            <el-option label="充值" value="1"/>
                        </el-select>
                    </div>
                    <el-button type="primary" @click="exportczxfjlfn">导出</el-button>
                </div>
                <el-table :data="elelist" style="width: 100%;margin-top: 16px" height="700"
                          :header-cell-style="{ background: '#FAFAFC', color: '#202536' }">
                    <el-table-column prop="payMoney" label="支付金额" align="center">
                        <template #default="scope">
                            <div class="orign" v-if="scope.row.payMoney">{{
                                    scope.row.payMoney ? scope.row.payMoney :
                                        '--'
                                }}
                            </div>
                            <div v-else>{{ scope.row.payMoney ? scope.row.payMoney : '--' }}</div>
                        </template>
                    </el-table-column>
                    <el-table-column min-width="150" prop="amount" label="充值/消费数量" align="center">
                        <template #default="scope">
                            <div v-if="scope.row.operateType === 0">-{{ scope.row.amount }}</div>
                            <div v-if="scope.row.operateType === 1">+{{ scope.row.amount }}</div>
                        </template>
                    </el-table-column>
                    <el-table-column min-width="100" prop="unitPrice" label="单价" align="center">
                        <template #default="scope">
                            <div v-if="scope.row.unitPrice">{{ scope.row.unitPrice ? scope.row.unitPrice : '--' }}</div>
                            <div v-else>{{ scope.row.unitPrice ? scope.row.unitPrice : '--' }}</div>
                        </template>
                    </el-table-column>
                    <el-table-column min-width="100" prop="operateType" label="操作类型" align="center">
                        <template #default="scope">
                            <div v-if="scope.row.operateType === 0">消费</div>
                            <div v-if="scope.row.operateType === 1">充值</div>
                        </template>
                    </el-table-column>
                    <el-table-column min-width="100" prop="voucherUrl" label="充值凭证" align="center">
                        <template #default="scope">
                            <BigPicture v-if="scope.row.voucherUrl" text="查看凭证" align="center"
                                        :imageUrl="scope.row.voucherUrl"/>
                            <div v-else>--</div>
                        </template>
                    </el-table-column>
                    <el-table-column min-width="170" prop="createTime" label="日期">
                    </el-table-column>
                    <el-table-column min-width="180" prop="deadline" label="操作">
                        <template #default="scope">
                            <div v-if="scope.row.voucherUrl" class="pointer blue"
                                 @click="downloadpz(scope.row.voucherUrl)">下载凭证
                            </div>
                            <div v-else>--</div>
                        </template>
                    </el-table-column>
                </el-table>
                <div>
                    <Pagination :total="eletotal" :currentPage="elepagenum" :pageSize="elepagesize"
                                @SizeChange="changeelepagesize" @CurrentChange="changeelepagenum"/>
                </div>
            </div>
        </el-drawer>
        <el-dialog v-model="companyservicetcflag" title="账户设置" width="293">
            <div class="switchbox">
                <div class="switchitem">
                    <div class="switchlable">
                        <div>发薪：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch :disabled="!allinfo.fx" v-model="allinfo.fx" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
                <div class="switchitem">
                    <div class="switchlable">
                        <div>日日保：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch :disabled="!allinfo.day" v-model="allinfo.day" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
                <div class="switchitem">
                    <div class="switchlable">
                        <div>电子签：</div>
                    </div>
                    <div class="switchlablecontent">
                        <el-switch :disabled="!allinfo.ele" v-model="allinfo.ele" class="ml-2"
                                   style="--el-switch-on-color: #2361FF; --el-switch-off-color: #ccc"/>
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-top:16px;">
                <el-button class="my_cancelbtn" @click="closeallservicetc">取消
                </el-button>
                <el-button class="my_btn" @click="chabgeallinfosure">确定
                </el-button>
            </div>
        </el-dialog>
    </div>
    <dialogRate v-model:show="showRate" :companyId="companyId" :companyName="companyName"/>
    <DialogAlipayWithdraw v-model:show="showAlipayWithdraw" :companyId="companyId" @success="getbulletpayrollmsg"/>
</template>

<script setup lang="ts">
import {convertCurrency} from '../../utils/utils'
import baseurl from '../../api/env'
import {Search} from '@element-plus/icons-vue'
import crumbs from '../../components/crumbs.vue'
import dialogRate from './components/dialogRate.vue'
import {
    TabsPaneContext,
    ElMessage,
    ElMessageBox,
    UploadRawFile,
} from 'element-plus'
import type {FormInstance, FormRules} from 'element-plus'
import {
    getqueryTomorrowEnsureCostapi,
    periodwithdrawaccountbalance,
    withdrawaccountbalance,
    cexportdayinsureRecordofinsuranceapi,
    invoiceexportallapi,
    operatestaffexportapi,
    inwarrantyprovedexportpdfapi,
    inwarrantyprovedexportapi,
    inwarrantystaffexportapi,
    staffrecordexportapi,
    InsurComCompanyPlansexportapi,
    exportaccountdetailsapi,
    changeminiapproleapi,
    changepcroleapi,
    getallinvoicelistapi,
    getalladminapi,
    gettybbasemsgapi,
    everyrechargeapi,
    geteverydayinsuranceaudittypeapi,
    geteverydayinsuranceaudicompanytapi,
    longrechargeapi,
    getdayinsuredetailapi,
    exportdayinsureRecordofinsuranceapi,
    getRecordofinsuranceapi,
    changedayandteamhyapi,
    getdayinsurejoblistapi,
    dayinsurecheckdispatchingAgencyapi,
    getdayinsurecompanylistapi,
    datinsureadminsetapi,
    getdayRateofclaimapi,
    geteverydayinsuranceauditmsgapi,
    updatelonginsureflapi,
    getinvoiceapi,
    setmarketapi,
    getfapiaomsgapi,
    getbuyinsurepeoplelistapi,
    getlongtimeinsuranceaudittypeapi,
    getlongtimeinsuranceaudicompanytapi,
    longdispatchingagencycheckapi,
    getlongjoblistapi,
    longuploadvideoapi,
    longaddvideoapi,
    getlonginsurecompanylistapi,
    bulletpayrechargeapi,
    addinsureplanactivityapi,
    changeinsureplanactivityapi,
    getinsureplanactivitylistapi,
    delinsurecomapnyplanapi,
    changeinsureplanapi,
    getinsureplanmsgapi,
    checkinsureguaranteeslipdetapi,
    addlonginsurehistorylistapi,
    getcompanyinsuretypeapi,
    longinsuresetoveragenumapi,
    lookonceaddinsurelistapi,
    onceaddinsureapi,
    reducelonginsureapi,
    getlonginsuremsgapi,
    getlongoveragelistapi,
    longsetadminapi,
    changemarketapi,
    getmarketapi,
    getbulletpayrollapi,
    geteverydayinsuranceauditapi,
    getelectronicvisaauditapi,
    getlongtimeinsuranceauditapi,
    getmessageauditapi,
    getlongbasemsgapi,
    getzhmxlistapi,
    resetpasswordapi,
    resetpasswordapipc,
    okornologinapi,
    setorcanceladminapi,
    changeteamroleapi,
    openpcapi,
    getbulletpayrollmsgapi,
    getclientsdetailapi,
    getditchapi,
    changeclientdetailmsgapi,
    getditchskadminapi,
    derivebasemsgapi,
    getteamapi,
    getqueryinsurancecompanyapi,
    addoredittyInsurapi,
    getcompanyseatinfoapi,
    setcoseatapi,
    updateperiodoverdraftamount,
    getqueryreceiptaccountapi,
    PayManagerUserApi,
    alipayAccountApi,
    getInsurComCompanyPlansDailyListApi,
    updateDayInsurePriceApi,
    getlongtimeinsuranceaudittypeapic, getDicts
} from '../../api/api'
import {
    elesignamountrechargeapi,
    getqueryaccountrecordapi,
    exportczxfjlapi,
} from '../../api/electronicVisa/electronicVisa'
import {
    alipayRegister,
    onBreakOffAnEngagementApi
} from '../../api/alipay/alipay'
import {
    getCurrentInstance,
    ComponentInternalInstance,
    ref,
    reactive,
    onMounted,
    onBeforeUnmount,
    watchEffect,
    createVNode,
} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import dayjs from 'dayjs'
import {GetDate, shake, wait} from '../../utils/utils'
import previewDialog from '@/components/previewDialog/index.vue'
import axios from 'axios'
import ElectronicVisaDetail from './electronicVisaDetail.vue'
import maYiInsuranceDetail from './maYiInsuranceDetail.vue'
import {confirm} from '@/utils/utils'
import uploadImage from './components/uploadImage.vue'
import DialogAlipayWithdraw from './components/DialogAlipayWithdraw.vue'
import {number} from "echarts";


const showAlipayWithdraw = ref(false) // 支付宝提现弹框
const onShowEditDayInsurePriceFlag = (i: number) => {
    InsurComCompanyPlansDailyList.value[i].showEditDayInsurePriceFlag = true
}
const onSureChangePriceOfDayInsure = async (val: string, id: number) => {
    console.log(val)
    if (val) {
        await updateDayInsurePriceApi({
            id: id,
            price: val
        })
        await getInsurComCompanyPlansDailyList()
    } else {
        ElMessage.warning('请输入价格')
    }
}

const OnGeneratingContractCode = async () => {
    const res: any = await alipayRegister({companyId: companyId.value})
    console.log(res, 'gdyfygudf')
    if (res.msg) {
        ElMessage.warning(res.msg)
        return
    }
    window.open(res)
}
const onBreakOffAnEngagement = async () => {
    ElMessageBox.confirm('确定解约吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    }).then(async () => {
        await onBreakOffAnEngagementApi({companyId: companyId.value})
        await getclientsdetail()
        await getbulletpayrollmsgapi(companyId.value).then(
            (res: any) => {
                payBasicInfo.value = res
                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                alipayRegisterStatus.value = res.alipayRegisterStatus
                paybasemsg_accountExpireTime.value =
                    res.accountExpireTime
                paybasemsg_saleId.value = res.saleId
                paybasemsg_dealId.value = res.dealId
                paybasemsg_payProductOpenTime.value =
                    res.payProductOpenTime
                paybasemsg_isOpenPaySalary.value =
                    res.isOpenPaySalary
                paybasemsg_phone.value = res.phone
                paybasemsg_superParentName.value =
                    res.superParentName
                paybasemsg_validTime.value = res.validTime
                paybasemsg_patMoneyCount.value =
                    res.patMoneyCount
                paybasemsg_payAccountBalance.value =
                    res.payAccountBalance
                paybasemsg_saleName.value = res.saleName
            }
        )
        await ElMessage.warning('解约成功')
    })
}
const isMobile = ref((window as any).isMobile)
const changephonedialog = ref(false)
const editPhone = (val: any) => {
    console.log(val)
    changephonedialog.value = true
    changephoneform.value.name = val.userName
    changephoneform.value.phone = val.phone
    changephoneform.value.id = val.id
    changephoneform.value.userid = val.userId
}
const changephoneform = ref({
    id: '',
    userid: '',
    name: '',
    phone: '',
} as any)
const changephoneok = async () => {
    if (!changephoneform.value.name) {
        ElMessage.warning('请输入姓名')
        return
    }
    if (!changephoneform.value.phone) {
        ElMessage.warning('请输入手机号')
        return
    }
    const res = await PayManagerUserApi({
        id: changephoneform.value.id,
        userId: changephoneform.value.userid,
        userName: changephoneform.value.name,
        phone: changephoneform.value.phone
    })
    console.log(res)
    getteam(companyId.value)
    changephoneno()
}
const changephoneno = () => {
    changephonedialog.value = false
    changephoneform.value.name = ''
    changephoneform.value.phone = ''
    changephoneform.value.id = ''
    changephoneform.value.userid = ''
}
const opencompanyservicestc = () => {
    companyservicetcflag.value = true
    if (openProduct.value.includes(0)) {
        allinfo.value.fx = true
    } else {
        allinfo.value.fx = false
    }
    if (openProduct.value.includes(2)) {
        allinfo.value.day = true
    } else {
        allinfo.value.day = false
    }
    if (openProduct.value.includes(1)) {
        allinfo.value.ele = true
    } else {
        allinfo.value.ele = false
    }
    // console.log(openProduct.value, 11111222333444)
}
const allinfo = ref({
    fx: true,
    ele: true,
    day: true,
})
const chabgeallinfosure = () => {
    let obj = {
        id: companyId.value,
        auditStatus: basemsg.auditStatus,
        insureCompanyType: everyform.bxcompany,
        insureTypeList: everyform.bxtype,
        creditCode: basemsg.creditCode,
        legalPerson: basemsg.legalPerson,
        merchantBankCard: basemsg.merchantBankCard,
        area: basemsg.area,
        channelId: ditch.value,
        companyName: companyName.value,
    }
    if (allinfo.value.day !== openProduct.value.includes(2)) {
        obj.isOpenWesure = allinfo.value.day ? 1 : 0
    }
    if (allinfo.value.fx !== openProduct.value.includes(0)) {
        obj.isOpenPaySalary = allinfo.value.fx ? 1 : 0
    }
    if (allinfo.value.ele !== openProduct.value.includes(1)) {
        obj.isOpenEleSign = allinfo.value.ele ? 1 : 0
    }
    changeclientdetailmsgapi(obj).then((res: any) => {
        console.log(res, 1234567890)
        if (res.code === 200) {
            ElMessage({
                message: '操作成功',
                type: 'success',
            })
            getclientsdetail()
            closeallservicetc()
        }
    })
}

const closeallservicetc = () => {
    companyservicetcflag.value = false
}
const companyservicetcflag = ref(false)

const changezdfxxs = (val: any) => {
    getqueryreceiptaccountapi({id: val}).then((res: any) => {
        console.log(res, 'hgdsfghudfuyhgui')
        bulletform.payditch = res.channelId ? res.channelId * 1 : ''
        getditchskadminapi(bulletform.payditch).then((resc: any) => {
            payadminlist.value = resc.list
            skzhlistzdfx.value = resc.list
            bulletform.payadmin = res.channelId && res.id ? res.id * 1 : ''
        })
    })
}

const changelongxs = (val: any) => {
    getqueryreceiptaccountapi({id: val}).then((res: any) => {
        console.log(res, 'hgdsfghudfuyhgui')
        longform.payditch = res.channelId ? res.channelId * 1 : ''
        getditchskadminapi(longform.payditch).then((resc: any) => {
            payadminlist.value = resc.list
            skzhlistlong.value = resc.list
            longform.payadmin = res.channelId && res.id ? res.id * 1 : ''
        })
    })
}

const changedayxs = (val: any) => {
    getqueryreceiptaccountapi({id: val}).then((res: any) => {
        console.log(res, 'hgdsfghudfuyhgui')
        everyform.payditch = res.channelId ? res.channelId * 1 : ''
        getditchskadminapi(everyform.payditch).then((resc: any) => {
            payadminlist.value = resc.list
            skzhlistday.value = resc.list
            everyform.payadmin = res.channelId && res.id ? res.id * 1 : ''
        })
    })
}

const changetyrbxs = (val: any) => {
    getqueryreceiptaccountapi({id: val}).then((res: any) => {
        console.log(res, 'hgdsfghudfuyhgui')
        tyrbform.payditch = res.channelId ? res.channelId * 1 : ''
        getditchskadminapi(tyrbform.payditch).then((resc: any) => {
            payadminlist.value = resc.list
            skzhlisttyrb.value = resc.list
            tyrbform.payadmin = res.channelId && res.id ? res.id * 1 : ''
        })
    })
}
const kqfedtc = ref(false)
const openkqfedtc = () => {
    kqfedtc.value = true
    kqfednum.value = null
}
const closekqfedtc = () => {
    kqfedtc.value = false
    kqfednum.value = null
}
const submitkqfed = () => {
    // if (kqfednum.value) {
    console.log(kqfednum.value)
    updateperiodoverdraftamount({
        companyId: companyId.value,
        periodOverdraftAmount: kqfednum.value,
    }).then((res: any) => {
        console.log(res, 111)
        closekqfedtc()
        getlongbasemsg()
    })
    // } else {
    //     ElMessage({
    //         message: '请输入金额',
    //         type: 'warning',
    //     })
    // }
}
const kqfednum = ref<any>(null)
const exportczxfjlfn = () => {
    exportczxfjlapi({
        companyId: companyId.value,
        companyName: companyName.value,
        operateType: elexfjltype.value,
    }).then((res: any) => {
        ElMessage({
            message: '导出成功',
            type: 'success',
        })
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const downloadpz = (val: any) => {
    window.open(val)
}
const getqueryaccountrecord = () => {
    getqueryaccountrecordapi({
        companyName: companyName.value,
        operateType: elexfjltype.value,
        pageSize: elepagesize.value,
        pageNum: elepagenum.value,
        companyId: companyId.value,
    }).then((res: any) => {
        console.log(res, '电子签列表')
        elelist.value = res.list
        eletotal.value = res.totalCount
    })
}
const elexfjltype = ref('')
const elelist = ref<any>([])
const openeleczjltc = () => {
    eleczxfjltcflag.value = true
    getqueryaccountrecord()
}

const eletotal = ref(0)
const elepagesize = ref(10)
const elepagenum = ref(1)
const changeelepagesize = (val: any) => {
    elepagesize.value = val
    elepagenum.value = 1
    getqueryaccountrecord()
}
const changeelepagenum = (val: any) => {
    elepagenum.value = val
    getqueryaccountrecord()
}
const removeelepz = () => {
    console.log(1111)
    eleselectedImage.value = ''
}
const elerecharge = () => {
    if (!eleje.value) {
        ElMessage({
            message: '请输入金额',
            type: 'warning',
        })
        return
    }
    if (!elefs.value) {
        ElMessage({
            message: '请输份数',
            type: 'warning',
        })
        return
    }
    if (!elefkfs.value) {
        ElMessage({
            message: '请选择付款方式',
            type: 'warning',
        })
        return
    }
    if (!eleskzh.value) {
        ElMessage({
            message: '请选择收款账户',
            type: 'warning',
        })
        return
    }
    if (!eleselectedImage.value) {
        ElMessage({
            message: '请上传凭证',
            type: 'warning',
        })
        return
    }
    elesignamountrechargeapi({
        companyId: companyId.value,
        payMode: elefkfs.value,
        payMoney: eleje.value,
        receiptId: eleskzh.value,
        rechargeAmount: elefs.value,
        voucherUrl: eleselectedImage.value.split(',')[1],
        productType: 1,
    }).then((res: any) => {
        if (res.code === 200) {
            ElMessage({
                message: '充值成功',
                type: 'success',
            })
            eleRechargecancel()
            console.log(electronicVisaDetaildom.value, 'gushyr')
        }
    })
}
const electronicVisaDetaildom = ref(null)
const eleRechargecancel = () => {
    eleremark.value = ''
    eleskzh.value = ''
    elefkfs.value = ''
    elefs.value = 1
    eleje.value = 1
    eleselectedImage.value = ''
    eledetailuploadref.value.clearFiles()
}
const eleremark = ref('')
const eleskzh = ref('')
const elefkfs = ref('')
const elefs = ref(1)
const eleje = ref(1)

const tyrbbxgslist = ref<any>([])
const getqueryinsurancecompany = () => {
    getqueryinsurancecompanyapi().then((res) => {
        tyrbbxgslist.value = res
        console.log(res, 'getqueryinsurancecompanyapi')
    })
}
const eleczxfjltcflag = ref(false)
const eledetailuploadref = ref()
const elefilelist = ref()
const elehandleExceed = (val: any) => {
    console.log(val[0].size, 'ghdjsghj')
    eledetailuploadref.value.clearFiles()
    const file = val[0]
    elefilelist.value = val
    if (file.size / 1024 / 1024 > 5) {
        ElMessage({
            type: 'warning',
            message: '上传文件不能超过5MB',
        })
        eledetailuploadref.value.clearFiles()
        return
    }
}

const elefilelistchange = (file: any, fileListVal: any) => {
    console.log(file, fileListVal, 'hdgfsausdf')
    if (file.size / 1024 / 1024 > 5) {
        ElMessage({
            type: 'warning',
            message: '上传文件不能超过5MB',
        })
        eledetailuploadref.value.clearFiles()
        return
    }
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        console.log(url)
        eleselectedImage.value = url
    }
    reader.readAsDataURL(file.raw)
    elefilelist.value = fileListVal
}
const eleselectedImage = ref('')
const setseatadmins = (val: any) => {
    console.log(val)
    setcoseat(val.userId, true)
}
const closeseatadmins = (val: any) => {
    ElMessageBox.confirm(
        '该成员为审批流中的成员，取消发薪席位后将从审批流中移除，请与客户确定好后再取消，如确定取消发薪席位，点击确定取消，取消席位后该操作不可撤回',
        '确定取消发薪席位？',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        }
    )
        .then(() => {
            setcoseat(val.userId, false)
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消',
            })
        })
}
const setcoseat = (userId: any, isSeatAdmin: any) => {
    setcoseatapi({
        isSeatAdmin: isSeatAdmin,
        userId: userId,
        companyId: companyId.value,
    }).then((res: any) => {
        console.log(res)
        if (res) {
            ElMessage({
                type: 'success',
                message: '操作成功',
            })
            getteam(companyId.value)
        }
    })
}
const changebullpaytype = (val: any) => {
    console.log(val, 'ashfauy')
    if (val === 4) {
        issendforfree.value = true
        bullruleFormrecharge.Amountofservice = 0
    } else {
        issendforfree.value = false
    }
}
const issendforfree = ref(false)
const {proxy} = getCurrentInstance() as ComponentInternalInstance
const daynum = ref<any>(null)
const daytxremark = ref('')
const daytczhye = ref('')
const daytxacncel = () => {
    daynum.value = null
    daytxremark.value = ''
    daytxtc.value = false
}
const daytxsure = () => {
    if (daynum.value === null) {
        ElMessage({
            message: '请输入提现金额',
            type: 'warning',
        })
    } else if (daynum.value === 0) {
        ElMessage({
            message: '提现金额不能为零',
            type: 'warning',
        })
    } else {
        withdrawaccountbalance({
            companyId: companyId.value,
            remark: daytxremark.value,
            withdrawAmount: daynum.value,
        }).then((res: any) => {
            console.log(res, '提现')
            if (res.code === 200) {
                ElMessage({
                    message: '提现成功',
                    type: 'success',
                })
                geteverydayinsuranceauditmsg()
                daytxacncel()
            }
        })
    }
}
const dattxall = () => {
    daynum.value = daytczhye.value
}
const daytx = () => {
    daynum.value = null
    daytxremark.value = ''
    daytczhye.value = dayinsurezhye.value * 1
    daytxtc.value = true
}
const daytxtc = ref(false)

const longtxsure = () => {
    if (longnum.value === null) {
        ElMessage({
            message: '请输入提现金额',
            type: 'warning',
        })
    } else if (longnum.value === 0) {
        ElMessage({
            message: '提现金额不能为零',
            type: 'warning',
        })
    } else {
        periodwithdrawaccountbalance({
            companyId: companyId.value,
            remark: longtxremark.value,
            withdrawAmount: longnum.value,
        }).then((res: any) => {
            console.log(res, '提现')
            if (res.code === 200) {
                ElMessage({
                    message: '提现成功',
                    type: 'success',
                })
                getlongbasemsg()
                longtxacncel()
            }
        })
    }
}
const longtxacncel = () => {
    longnum.value = null
    longtxremark.value = ''
    longtxtc.value = false
}
const longtxall = () => {
    longnum.value = longtczhye.value
}
const longnum = ref<any>(null)
const longtxremark = ref('')
const longtczhye = ref('')
const longtx = () => {
    getqueryTomorrowEnsureCostapi({companyId: companyId.value}).then(
        (res: any) => {
            console.log(res, 'daydaydayd')
            console.log(res.data, 'res')
            longtomorrowprice.value = res
        }
    )
    longnum.value = null
    longtxremark.value = ''
    longtczhye.value = longbasemsg_wesureBalance.value * 1
    longtxtc.value = true
}
const longtxtc = ref(false)
const longtomorrowprice = ref('')
const disabledDate = (time: Date) => {
    return time.getTime() < new Date(reducetime.value).getTime()
}
const exportdaytbjl = () => {
    cexportdayinsureRecordofinsuranceapi({
        insureCompanyType: 'insure002_gsc',
        companyId: companyId.value,
        beginInsureDay:
            dayinsuretbjldate.value === null || dayinsuretbjldate.value === ''
                ? ''
                : dayinsuretbjldate.value[0],
        endInsureDay:
            dayinsuretbjldate.value === null || dayinsuretbjldate.value === ''
                ? ''
                : dayinsuretbjldate.value[1],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const exporttyrbtbjl = () => {
    cexportdayinsureRecordofinsuranceapi({
        insureCompanyType: 'insure_type_tyrb',
        companyId: companyId.value,
        endInsureDay:
            tyrbinsuretbjldate.value === null || tyrbinsuretbjldate.value === ''
                ? ''
                : tyrbinsuretbjldate.value[1],
        beginInsureDay:
            tyrbinsuretbjldate.value === null || tyrbinsuretbjldate.value === ''
                ? ''
                : tyrbinsuretbjldate.value[0],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const bhcancel = () => {
    Causeofrejection.value = ''
    reject.value = false
}
const bhok = () => {
    if (Causeofrejection.value === '') {
        ElMessage.error('请输入驳回原因')
    } else {
        if (butype.value === 'bull') {
            getbulletpayrollapi({
                id: bullruleForm.id,
                companyId: bullruleForm.companyId,
                status: 2,
                payMode: bullruleForm.paymode,
                remark: Causeofrejection.value,
                receiptId: bullruleForm.receptid,
            }).then((res: any) => {
                console.log(res)
                bullaudit.value = false
                reject.value = false
                bullresetForm(bullruleFormRef.value)
                getzhmxlist()
            })
        } else if (butype.value === 'ele') {
            getelectronicvisaauditapi({
                id: eleruleForm.id,
                companyId: eleruleForm.companyId,
                status: 2,
                payMode: eleruleForm.paymode,
                remark: Causeofrejection.value,
                receiptId: eleruleForm.receptid,
            }).then((res: any) => {
                console.log(res)
                eleaudit.value = false
                reject.value = false
                eleresetForm(eleruleFormRef.value)
                getzhmxlist()
            })
        } else if (butype.value === 'long') {
            getlongtimeinsuranceauditapi({
                operateFlag: 2,
                receiptId: longruleForm.receptid,
                payMode: longruleForm.paymode,
                remark: Causeofrejection.value,
                companyId: longruleForm.companyId,
                id: longruleForm.id,
            }).then((res: any) => {
                console.log(res)
                reject.value = false
                longaudit.value = false
                longresetForm(longruleFormRef.value)
                getzhmxlist()
            })
        } else if (butype.value === 'every') {
            geteverydayinsuranceauditapi({
                operateFlag: 2,
                receiptId: everyruleForm.receptid,
                payMode: everyruleForm.paymode,
                remark: Causeofrejection.value,
                companyId: everyruleForm.companyId,
                id: everyruleForm.id,
            }).then((res: any) => {
                console.log(res)
                reject.value = false
                everyaudit.value = false
                everyresetForm(everyruleFormRef.value)
                getzhmxlist()
            })
        } else if (butype.value === 'message') {
            getmessageauditapi({
                operateFlag: 2,
                receiptId: messageruleForm.receptid,
                payMode: messageruleForm.paymode,
                remark: Causeofrejection.value,
                companyId: messageruleForm.companyId,
                id: messageruleForm.id,
            }).then((res: any) => {
                console.log(res)
                reject.value = false
                messageaudit.value = false
                messageresetForm(messageruleFormRef.value)
                getzhmxlist()
            })
        }
    }
}
const bullpayuploadRef = ref()
const bullpayfileList = ref([])
const bullpayonChange = (file: any, fileListVal: any) => {
    console.log(file)
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        console.log(url)
        bullpayselectedImage.value = url
    }
    reader.readAsDataURL(file.raw)
    bullpayfileList.value = fileListVal
}
const bullpayselectedImage = ref<any>(null)
const longpayuploadRef = ref()
const longpayfileList = ref([])
const longpayonChange = (file: any, fileListVal: any) => {
    console.log(file)
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        console.log(url)
        longpayselectedImage.value = url
    }
    reader.readAsDataURL(file.raw)
    longpayfileList.value = fileListVal
}
const longpayselectedImage = ref<any>(null)
const daypayuploadRef = ref()
const daypayfileList = ref([])
const daypayonChange = (file: any, fileListVal: any) => {
    console.log(file)
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        console.log(url)
        daypayselectedImage.value = url
    }
    reader.readAsDataURL(file.raw)
    daypayfileList.value = fileListVal
}
const daypayselectedImage = ref<any>(null)
const invoiceexportallfnok = () => {
    invoiceexportallapi({
        status: 2,
        salesId: oksalesname.value,
        receiptIds: okreceiptIds.value,
        applicationMonth: okapplicationMonth.value ? okapplicationMonth.value : '',
        companyName: companyName.value,
        type: oktype.value,
        openDay: okopenDay.value,
        checkStatus: okcheckStatus.value,
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const invoiceexportallfnno = () => {
    invoiceexportallapi({
        status: 1,
        salesId: nosalesname.value,
        receiptIds: noreceiptIds.value,
        applicationMonth: noapplicationMonth.value ? noapplicationMonth.value : '',
        companyName: companyName.value,
        type: notype.value,
        openDay: noopenDay.value,
        checkStatus: nocheckStatus.value,
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const operatestaffexport = () => {
    operatestaffexportapi(operateRecordId.value).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const inwarrantyprovedexportpdf = () => {
    if (
        longinsuretbrydcsj.value.length === 0 ||
        longinsuretbrydcsj.value === 0
    ) {
        ElMessage({
            message: '保险名称与导出时间不能为空',
            type: 'warning',
        })
        return
    }
    inwarrantyprovedexportpdfapi({
        companyId: companyId.value,
        insurCompany: longinsuretbrybsmc.value,
        insurStartTime: longinsuretbrykssj.value,
        insurEndTime: longinsuretbryjssj.value,
        isDelete: 0,
        companyPlanName: longinsuretbrybsfa.value,
        serveCompanyName: longinsuretbrypqdw.value,
        userName: longinsuretbryname.value,
        idCardNo: longinsuretbryid.value,
        occupationLevel: longinsuretbrykhfxdj.value,
        occupationOriginLevel: longinsuretbrybsfxdj.value,
        isMonthMode: longinsuretbryydms.value,
        queryStartDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[0],
        queryEndDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[1],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/downloadZip?delete=true&uuid=' + res
    })
}
const inwarrantyprovedexport = () => {
    if (
        longinsuretbrydcsj.value.length === 0 ||
        longinsuretbrydcsj.value === 0
    ) {
        ElMessage({
            message: '保险名称与导出时间不能为空',
            type: 'warning',
        })
        return
    }
    inwarrantyprovedexportapi({
        companyId: companyId.value,
        insurCompany: longinsuretbrybsmc.value,
        insurStartTime: longinsuretbrykssj.value,
        insurEndTime: longinsuretbryjssj.value,
        isDelete: 0,
        companyPlanName: longinsuretbrybsfa.value,
        serveCompanyName: longinsuretbrypqdw.value,
        userName: longinsuretbryname.value,
        idCardNo: longinsuretbryid.value,
        occupationLevel: longinsuretbrykhfxdj.value,
        occupationOriginLevel: longinsuretbrybsfxdj.value,
        isMonthMode: longinsuretbryydms.value,
        queryStartDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[0],
        queryEndDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[1],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const inwarrantystaffexport = () => {
    if (
        longinsuretbrydcsj.value.length === 0 ||
        longinsuretbrydcsj.value === 0
    ) {
        ElMessage({
            message: '保险名称与导出时间不能为空',
            type: 'warning',
        })
        return
    }
    console.log(longinsuretbrydcsj.value)
    inwarrantystaffexportapi({
        companyId: companyId.value,
        insurCompany: longinsuretbrybsmc.value,
        insurStartTime: longinsuretbrykssj.value,
        insurEndTime: longinsuretbryjssj.value,
        isDelete: 0,
        companyPlanName: longinsuretbrybsfa.value,
        serveCompanyName: longinsuretbrypqdw.value,
        userName: longinsuretbryname.value,
        idCardNo: longinsuretbryid.value,
        occupationLevel: longinsuretbrykhfxdj.value,
        occupationOriginLevel: longinsuretbrybsfxdj.value,
        // policyStatus: longinsuretbrybxzt.value,
        isMonthMode: longinsuretbryydms.value,
        queryStartDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[0],
        queryEndDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[1],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const staffrecordexport = () => {
    staffrecordexportapi({
        companyId: companyId.value,
        insurCompany: longinsuretbrybsmc.value,
        insurStartTime: longinsuretbrykssj.value,
        insurEndTime: longinsuretbryjssj.value,
        isDelete: 0,
        companyPlanName: longinsuretbrybsfa.value,
        serveCompanyName: longinsuretbrypqdw.value,
        userName: longinsuretbryname.value,
        idCardNo: longinsuretbryid.value,
        occupationLevel: longinsuretbrykhfxdj.value,
        occupationOriginLevel: longinsuretbrybsfxdj.value,
        policyStatus: longinsuretbrybxzt.value,
        isMonthMode: longinsuretbryydms.value,
        queryStartDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[0],
        queryEndDate:
            longinsuretbrydcsj.value.length === 0
                ? ''
                : longinsuretbrydcsj.value[1],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const changeroleok = () => {
    if (pingtai.value === 0) {
        changeminiapproleapi({
            companyId: companyId.value,
            userId: changeroleuserid.value,
            type: 0,
            isAdmin: rolecode.value,
        }).then((res: any) => {
            console.log(res)
            if (res.code === 200) {
                dialogchangeroleoropenpcVisible.value = false
                getteam(companyId.value)
                ElMessage({
                    type: 'success',
                    message: '修改成功',
                })
            }
        })
    } else if (pingtai.value === 1) {
        changepcroleapi({
            id: changeroleandopenpc.id,
            isAdmin: rolecode.value,
        }).then((res: any) => {
            console.log(res)
            if (res.code === 200) {
                dialogchangeroleoropenpcVisible.value = false
                getteam(companyId.value)
                ElMessage({
                    type: 'success',
                    message: '修改成功',
                })
            }
        })
    }
}
const pingtai = ref<any>(null)
const rolecode = ref<any>(null)
const disabledinvoiceDate = (time: Date) => {
    const t = new Date().getDate()
    // 如果想包含本月本月 - 8.64e7 * t 就不需要了，
    // 如果想之前的不能选择把 > 换成 <
    return time.getTime() > Date.now() - 8.64e7 * t
    // return time.getTime() > Date.now()
}
const centerDialogVisible = ref(false)
const token = ref<any>('')
const getcompanyseatinfo = () => {
    getcompanyseatinfoapi({companyId: companyId.value}).then((res: any) => {
        console.log(res, '席位')
        hasSeat.value = res.hasSeat
        useSeat.value = res.useSeat
    })
}
const useSeat = ref(0)
const hasSeat = ref(0)
onMounted(() => {
    token.value = sessionStorage.getItem('token')
    const y: any = new Date().getFullYear()
    const m: any =
        new Date().getMonth() >= 10
            ? new Date().getMonth()
            : '0' + new Date().getMonth()
    invoiceDate.value = `${y}-${m}`
    dayinvoiceDate.value = `${y}-${m}`
    const m2: any =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + new Date().getMonth() + 1
    var lastDate = new Date(y, m2 * 1, 0).getDate()
    dayinsuretbjldate.value[0] = `${y}-07-01`
    dayinsuretbjldate.value[1] = `${y}-07-${lastDate}`
    tyrbinsuretbjldate.value[0] = `${y}-07-01`
    tyrbinsuretbjldate.value[1] = `${y}-07-${lastDate}`
    console.log(dayinsuretbjldate.value, '12121')
    const id: any = route.query.id
    companyId.value = id
    getditchskadmin()
    getditch()
    getclientsdetail()
    getteam(companyId.value)
    getbulletpayrollmsg()
    getIndustryList()
    getzhmxlist()
    getmarket()
    getcompanyseatinfo()
    getqueryinsurancecompany()
})
const industrylist = ref<any>([])
// 获取行业列表
const getIndustryList = async () => {
    const res: any = await getDicts('saas_company_industry')
    console.log(res, '行业列表111')
    industrylist.value = res
}
const moreinvoicelistuploadtcopen = () => {
    console.log(111)
    moreinvoicelistuploadtc.value = true
}
const invoicelistuploadtc = ref(false)
const moreinvoicelistuploadtc = ref(false)
const uploadlonginvoiceid = ref(0)
const uploadinvoice = (val: any) => {
    console.log(val.id)
    uploadlonginvoiceid.value = val.id
    invoicelistuploadtc.value = true
}
const okpagesize = ref(10)
const nopagesize = ref(10)
const okpagenum = ref(1)
const nopagenum = ref(1)
const oktotal = ref(0)
const nototal = ref(0)
const oksalesname = ref('')
const nosalesname = ref('')
const okreceiptIds = ref([])
const noreceiptIds = ref([])
const okmonth = ref('')
const nomonth = ref('')
const okapplicationMonth = ref('')
const noapplicationMonth = ref('')
const oktype = ref('')
const notype = ref('')
const okopenDay = ref('')
const noopenDay = ref('')
const okcheckStatus = ref('')
const nocheckStatus = ref('')
const oktabledate = ref<any>([])
const notabledate = ref<any>([])
const changeokpagesize = (val: any) => {
    okpagesize.value = val
    okpagenum.value = 1
    getokallinvoicelist()
}
const changeokpagenum = (val: any) => {
    okpagenum.value = val
    getokallinvoicelist()
}
const changenopagesize = (val: any) => {
    nopagesize.value = val
    nopagenum.value = 1
    getnoallinvoicelist()
}
const changenopagenum = (val: any) => {
    nopagenum.value = val
    getnoallinvoicelist()
}
// 获取收款账户
const getalladmin = async () => {
    const res: any = await getalladminapi()
    console.log(res, '收款账户列表')
    alladdmin.value = res.list
    skzhlist.value = res.list
}
const alladdmin = ref<any>([])
const getokallinvoicelist = async () => {
    const res: any = await getallinvoicelistapi({
        pageNum: okpagenum.value,
        pageSize: okpagesize.value,
        status: 2,
        salesId: oksalesname.value,
        receiptIds: okreceiptIds.value,
        applicationMonth: okapplicationMonth.value ? okapplicationMonth.value : '',
        companyName: companyName.value,
        type: oktype.value,
        openDay: okopenDay.value,
        checkStatus: okcheckStatus.value,
    })
    console.log(res, '已上传发票列表')
    oktabledate.value = res.list
    oktotal.value = res.total
}
const getnoallinvoicelist = async () => {
    const res: any = await getallinvoicelistapi({
        pageNum: nopagenum.value,
        pageSize: nopagesize.value,
        status: 1,
        salesId: nosalesname.value,
        receiptIds: noreceiptIds.value,
        applicationMonth: noapplicationMonth.value ? noapplicationMonth.value : '',
        companyName: companyName.value,
        type: notype.value,
        openDay: noopenDay.value,
        checkStatus: nocheckStatus.value,
    })
    console.log(res, '未上传发票列表')
    notabledate.value = res.list
    nototal.value = res.total
}
const showPreview = ref(false)
const previewUrl = ref('')
const lookfp = (val: any) => {
    console.log(11111, val)
    previewUrl.value = val.invoiceUrl
    showPreview.value = true
    // window.open(val.invoiceUrl)
}
const getcompanyallmsg = () => {
    axios({
        url: `${baseurl}/saas/note/operator/info?companyId=${companyId.value}`,
        method: 'get',
        headers: {Authorization: 'Bearer ' + sessionStorage.getItem('token')},
    }).then((res: any) => {
        console.log(res, 'gyfasughy')
        if (res.data) {
            console.log(111)
            tyrbform.bxgs = res.data.insurCompany
            tyrbform.gsdgzh = res.data.accountLimit
            tyrbform.jbrxm = res.data.operatorName
            tyrbform.jbrid = res.data.operatorIdCard
            tyrbform.jbrphone = res.data.contact
            tyrbchangeobj = res.data
        } else {
            console.log(222)
            tyrbform.bxgs = tyrbbxgslist.value[0].dictValue
            tyrbform.gsdgzh = ''
            tyrbform.jbrxm = ''
            tyrbform.jbrid = ''
            tyrbform.jbrphone = ''
        }
    })
}
let tyrbchangeobj = reactive({})
const handleClick = (tab: TabsPaneContext, event: Event) => {
    console.log(tab.index)
    if (tab.index === '0') {
        console.log('子弹发薪')
        getditch()
        getclientsdetail()
        getteam(companyId.value)
        getbulletpayrollmsg()
        getzhmxlist()
    } else if (tab.index === '1') {
        console.log('长期保')
        getclientsdetail()
        getlonginsuremsg()
        getlongbasemsg()
        getlongjoblist()
        getlonginsurecompanylist()
        getlongtimeinsuranceaudicompanyt()
        getbuyinsurepeoplelist()
        getfapiaomsg(3, invoiceDate.value)
    } else if (tab.index === '2') {
        console.log('日日保')
        geteverydayinsuranceaudicompanyt()
        getclientsdetail()
        getdayinsurecompanylist()
        getRecordofinsurance()
        geteverydayinsuranceauditmsg()
        getfapiaomsg(0, dayinvoiceDate.value)
        getInsurComCompanyPlansDailyList()
    } else if (tab.index === '3') {
        console.log('团意保')
        getclientsdetail()
        gettybbasemsg()
        gettyrbRecordofinsurance()
        getteaminsurecompanylist()
        getcompanyallmsg()
    } else if (tab.index === '4') {
        console.log('电子签')
        getclientsdetailc()
    }
    // else if (tab.index === "4") {
    //   console.log("蚂蚁保");
    // }
}

const InsurComCompanyPlansDailyList = ref<any>([])

const getInsurComCompanyPlansDailyList = async () => {
    const res: any = await getInsurComCompanyPlansDailyListApi({companyId: companyId.value})
    console.log(res, '日日保保险方案列表')
    res.list.forEach((item: any) => {
        item.showEditDayInsurePriceFlag = false
    })
    InsurComCompanyPlansDailyList.value = res.list
}
const settyrbsale = () => {
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    if (!tyrbform.tyrbsaleid) {
        ElMessage({
            message: '请选择销售',
            type: 'warning',
        })
        return
    }
    if (!tyrbform.bxgs) {
        ElMessage({
            message: '请选择保险公司',
            type: 'warning',
        })
        return
    }
    if (!tyrbform.shh) {
        ElMessage({
            message: '请输入商户号',
            type: 'warning',
        })
        return
    }
    if (tyrboldsaleid.value === null) {
        addoredittyInsurapi({
            id: companyId.value,
            insurCompany: tyrbform.bxgs,
            subMchid: tyrbform.shh,
            accountLimit: tyrbform.gsdgzh,
            operatorName: tyrbform.jbrxm,
            operatorIdCard: tyrbform.jbrid,
            contact: tyrbform.jbrphone,
            productType: 6,
            channelId: tyrbform.payditch,
            receiptId: tyrbform.payadmin,
        }).then((res: any) => {
            if (res.code === 200) {
                gettybbasemsg()
                setmarketapi({
                    companyId: companyId.value,
                    id: tyrbdealId.value,
                    productType: 6,
                    saleId: tyrbform.tyrbsaleid,
                    serviceStartTime: `${y}-${m}-01`,
                    serviceState: 0,
                }).then((res: any) => {
                    if (res.code === 200) {
                        ElMessage({
                            type: 'success',
                            message: '修改成功',
                        })
                        getclientsdetail()
                        gettybbasemsg()
                        getcompanyallmsg()
                        getbulletpayrollmsgapi(companyId.value).then(
                            (res: any) => {
                                payBasicInfo.value = res
                                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                alipayRegisterStatus.value = res.alipayRegisterStatus
                                paybasemsg_accountExpireTime.value =
                                    res.accountExpireTime
                                paybasemsg_saleId.value = res.saleId
                                paybasemsg_dealId.value = res.dealId
                                paybasemsg_payProductOpenTime.value =
                                    res.payProductOpenTime
                                paybasemsg_isOpenPaySalary.value =
                                    res.isOpenPaySalary
                                paybasemsg_phone.value = res.phone
                                paybasemsg_superParentName.value =
                                    res.superParentName
                                paybasemsg_validTime.value = res.validTime
                                paybasemsg_patMoneyCount.value =
                                    res.patMoneyCount
                                paybasemsg_payAccountBalance.value =
                                    res.payAccountBalance
                                paybasemsg_saleName.value = res.saleName
                            }
                        )
                    }
                })
            }
        })
    } else {
        addoredittyInsurapi({
            id: companyId.value,
            insurCompany: tyrbform.bxgs,
            subMchid: tyrbform.shh,
            accountLimit: tyrbform.gsdgzh,
            operatorName: tyrbform.jbrxm,
            operatorIdCard: tyrbform.jbrid,
            contact: tyrbform.jbrphone,
            productType: 6,
            channelId: tyrbform.payditch,
            receiptId: tyrbform.payadmin,
        }).then((res: any) => {
            if (res.code === 200) {
                changemarketapi({
                    companyId: companyId.value,
                    id: tyrbdealId.value,
                    productType: 6,
                    saleId: tyrbform.tyrbsaleid,
                    saleOldId: tyrboldsaleid.value,
                    serviceStartTime: `${y}-${m}-01`,
                    serviceState: 0,
                }).then((res: any) => {
                    if (res.code === 200) {
                        ElMessage({
                            type: 'success',
                            message: '修改成功',
                        })
                        getclientsdetail()
                        gettybbasemsg()
                        getcompanyallmsg()
                        getbulletpayrollmsgapi(companyId.value).then(
                            (res: any) => {
                                payBasicInfo.value = res
                                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                alipayRegisterStatus.value = res.alipayRegisterStatus
                                paybasemsg_accountExpireTime.value =
                                    res.accountExpireTime
                                paybasemsg_saleId.value = res.saleId
                                paybasemsg_dealId.value = res.dealId
                                paybasemsg_payProductOpenTime.value =
                                    res.payProductOpenTime
                                paybasemsg_isOpenPaySalary.value =
                                    res.isOpenPaySalary
                                paybasemsg_phone.value = res.phone
                                paybasemsg_superParentName.value =
                                    res.superParentName
                                paybasemsg_validTime.value = res.validTime
                                paybasemsg_patMoneyCount.value =
                                    res.patMoneyCount
                                paybasemsg_payAccountBalance.value =
                                    res.payAccountBalance
                                paybasemsg_saleName.value = res.saleName
                            }
                        )
                    }
                })
            }
        })
    }
}
const changetyrbsale = () => {
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    if (!tyrbform.tyrbsaleid) {
        ElMessage({
            message: '请选择销售',
            type: 'warning',
        })
        return
    }
    if (!tyrbform.bxgs) {
        ElMessage({
            message: '请选择保险公司',
            type: 'warning',
        })
        return
    }
    if (!tyrbform.shh) {
        ElMessage({
            message: '请输入商户号',
            type: 'warning',
        })
        return
    }
    ElMessageBox.confirm('确定修改吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            if (tyrboldsaleid.value === null) {
                addoredittyInsurapi({
                    id: companyId.value,
                    insurCompany: tyrbform.bxgs,
                    subMchid: tyrbform.shh,
                    accountLimit: tyrbform.gsdgzh,
                    operatorName: tyrbform.jbrxm,
                    operatorIdCard: tyrbform.jbrid,
                    contact: tyrbform.jbrphone,
                    productType: 6,
                    channelId: tyrbform.payditch,
                    receiptId: tyrbform.payadmin,
                }).then((res: any) => {
                    if (res.code === 200) {
                        gettybbasemsg()
                        setmarketapi({
                            companyId: companyId.value,
                            id: tyrbdealId.value,
                            productType: 6,
                            saleId: tyrbform.tyrbsaleid,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code === 200) {
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                                getclientsdetail()
                                gettybbasemsg()
                                getcompanyallmsg()
                                getbulletpayrollmsgapi(companyId.value).then(
                                    (res: any) => {
                                        payBasicInfo.value = res
                                        paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                        alipayRegisterStatus.value = res.alipayRegisterStatus
                                        paybasemsg_accountExpireTime.value =
                                            res.accountExpireTime
                                        paybasemsg_saleId.value = res.saleId
                                        paybasemsg_dealId.value = res.dealId
                                        paybasemsg_payProductOpenTime.value =
                                            res.payProductOpenTime
                                        paybasemsg_isOpenPaySalary.value =
                                            res.isOpenPaySalary
                                        paybasemsg_phone.value = res.phone
                                        paybasemsg_superParentName.value =
                                            res.superParentName
                                        paybasemsg_validTime.value =
                                            res.validTime
                                        paybasemsg_patMoneyCount.value =
                                            res.patMoneyCount
                                        paybasemsg_payAccountBalance.value =
                                            res.payAccountBalance
                                        paybasemsg_saleName.value =
                                            res.saleName
                                    }
                                )
                            }
                        })
                    }
                })
            } else {
                addoredittyInsurapi({
                    id: companyId.value,
                    insurCompany: tyrbform.bxgs,
                    subMchid: tyrbform.shh,
                    accountLimit: tyrbform.gsdgzh,
                    operatorName: tyrbform.jbrxm,
                    operatorIdCard: tyrbform.jbrid,
                    contact: tyrbform.jbrphone,
                    productType: 6,
                    channelId: tyrbform.payditch,
                    receiptId: tyrbform.payadmin,
                }).then((res: any) => {
                    if (res.code === 200) {
                        changemarketapi({
                            companyId: companyId.value,
                            id: tyrbdealId.value,
                            productType: 6,
                            saleId: tyrbform.tyrbsaleid,
                            saleOldId: tyrboldsaleid.value,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code === 200) {
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                                getclientsdetail()
                                gettybbasemsg()
                                getcompanyallmsg()
                                getbulletpayrollmsgapi(companyId.value).then(
                                    (res: any) => {
                                        payBasicInfo.value = res
                                        paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                        alipayRegisterStatus.value = res.alipayRegisterStatus
                                        paybasemsg_accountExpireTime.value =
                                            res.accountExpireTime
                                        paybasemsg_saleId.value = res.saleId
                                        paybasemsg_dealId.value = res.dealId
                                        paybasemsg_payProductOpenTime.value =
                                            res.payProductOpenTime
                                        paybasemsg_isOpenPaySalary.value =
                                            res.isOpenPaySalary
                                        paybasemsg_phone.value = res.phone
                                        paybasemsg_superParentName.value =
                                            res.superParentName
                                        paybasemsg_validTime.value =
                                            res.validTime
                                        paybasemsg_patMoneyCount.value =
                                            res.patMoneyCount
                                        paybasemsg_payAccountBalance.value =
                                            res.payAccountBalance
                                        paybasemsg_saleName.value =
                                            res.saleName
                                    }
                                )
                            }
                        })
                    }
                })
            }
        })
        .catch((err: any) => {
            getclientsdetail()
            getcompanyallmsg()
            gettybbasemsg()
            getbulletpayrollmsgapi(companyId.value).then((res: any) => {
                payBasicInfo.value = res
                paybasemsg_accountExpireTime.value = res.accountExpireTime
                paybasemsg_saleId.value = res.saleId
                paybasemsg_dealId.value = res.dealId
                paybasemsg_payProductOpenTime.value = res.payProductOpenTime
                paybasemsg_isOpenPaySalary.value = res.isOpenPaySalary
                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                alipayRegisterStatus.value = res.alipayRegisterStatus
                paybasemsg_phone.value = res.phone
                paybasemsg_superParentName.value = res.superParentName
                paybasemsg_validTime.value = res.validTime
                paybasemsg_patMoneyCount.value = res.patMoneyCount
                paybasemsg_payAccountBalance.value = res.payAccountBalance
                paybasemsg_saleName.value = res.saleName
            })
        })
}
const tyrbform = reactive<any>({
    gsdgzh: '',
    jbrxm: '',
    jbrid: '',
    jbrphone: '',
    tyrbsaleid: null,
    bxgs: '',
    payadmin: '',
    payditch: '',
    address: '',
    yyzzaddress: '',
    shh: '',
    khhjhh: '',
    frxm: '',
    yyzzbm: '',
    gsjc: '',
})

const mybform = reactive<any>({
    qyzfbh: '',
    mybsaleid: null,
    shh: '',
})
const gettybbasemsg = async () => {
    const res: any = await gettybbasemsgapi({
        companyId: companyId.value,
    })
    console.log(res, '团意保基本信息')
    isopentyrbflag.value = res.isOpenTyrbStatus
    isopentyrbstatus.value = res.isOpenTyrbStatus
    tyrbopentime.value = res.productOpenTime
    tyrbsalename.value = res.salesName
    tyrbzhye.value = res.wesureBalance
    tyrbsaleid.value = res.saleId
    tyrbdealId.value = res.dealId
    tyrbform.tyrbsaleid = res.saleId
    tyrboldsaleid.value = res.saleId
    tyrbform.payditch = res.channelId
    tyrbform.payadmin = res.receiptId
    getditchskadminapi(tyrbform.payditch).then((res: any) => {
        console.log(res, 1112)
        payadminlist.value = res.list
        skzhlisttyrb.value = res.list
    })
}
const isopentyrbstatus = ref<any>(null)
const isopenmybstatus = ref<any>(null)
const tyrboldsaleid = ref(0)
const isopentyrbflag = ref(0)
const isopenmybflag = ref(0)
const tyrbopentime = ref('')
const mybopentime = ref('')
const tyrbsaleid = ref(null)
const tyrbsalename = ref('')
const tyrbzhye = ref('')
const tyrbdealId = ref(0)
const changetyrbinsuretbjlpagenum = (val: any) => {
    tyrbinsuretbjlpagenum.value = val
    gettyrbRecordofinsurance()
}
const changetyrbinsuretbjlpagesize = (val: any) => {
    tyrbinsuretbjlpagesize.value = val
    tyrbinsuretbjlpagenum.value = 1
    gettyrbRecordofinsurance()
}
const gettyrbRecordofinsurance = async () => {
    const res: any = await getRecordofinsuranceapi({
        pageNum: tyrbinsuretbjlpagenum.value,
        pageSize: tyrbinsuretbjlpagesize.value,
        companyId: companyId.value,
        beginInsureDay:
            tyrbinsuretbjldate.value === null || tyrbinsuretbjldate.value === ''
                ? ''
                : tyrbinsuretbjldate.value[0],
        endInsureDay:
            tyrbinsuretbjldate.value === null || tyrbinsuretbjldate.value === ''
                ? ''
                : tyrbinsuretbjldate.value[1],
        insureCompanyType: 'insure_type_tyrb',
    })
    console.log(res, '获取团意日保投保记录列表')
    tyrbinsuretbjltotal.value = res.total
    tyrbinsuretbjltabledate.value = res.rows
}
const tyrbinsuretbjlpagenum = ref(1)
const tyrbinsuretbjlpagesize = ref(10)
const tyrbinsuretbjldate = ref<any>([])
const tyrbinsuretbjltotal = ref(0)
const tyrbinsuretbjltabledate = ref<any>([])
const everypaysubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
                everyrechargeapi({
                    companyId: companyId.value,
                    payMode: everyrpayuleForm.payMode,
                    receiptId: everyrpayuleForm.receiptId,
                    rechargeAmount: everyrpayuleForm.rechargeAmount,
                    voucherUrl: daypayselectedImage.value?daypayselectedImage.value.split(',')[1]:'',
                }).then((res: any) => {
                    console.log(res)
                    if (res.code === 200) {
                        ElMessage({
                            message: '充值成功。',
                            type: 'success',
                        })
                        everypayresetForm(everypayruleFormRef.value)
                        geteverydayinsuranceaudicompanyt()
                        getclientsdetail()
                        getdayinsurecompanylist()
                        getRecordofinsurance()
                        geteverydayinsuranceauditmsg()
                        getfapiaomsg(0, dayinvoiceDate.value)
                        dialogeveryVisible.value = false
                    }
                })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const everypayresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
    dialogeveryVisible.value = false
    daypayuploadRef.value.clearFiles()
    daypayselectedImage.value = null
}
const everypayruleFormRef = ref<FormInstance>()
const everyfileInput = ref<any>(null)
const everyhandleFileChange = () => {
    const file = everyfileInput.value.files[0]
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        // console.log(url);
        everypayimg.value = url
    }
    reader.readAsDataURL(file)
}
const everyrpayuleForm = reactive({
    rechargeAmount: 0,
    receiptId: '',
    payMode: '',
})
const everypayimg = ref('')
const everypay = () => {
    getditchskadmin()
    dialogeveryVisible.value = true
}
const dialogeveryVisible = ref(false)
const suresubmitdaymsg = () => {
    if (!everyform.paySaleid) {
        ElMessage({
            type: 'warning',
            message: '请选择销售',
        })
        return
    }
    if (everyform.bxcompany.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择保险公司',
        })
        return
    }
    if (everyform.bxtype.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择投保方案',
        })
        return
    }
    if (!everyform.payditch) {
        ElMessage({
            message: '请选择收款渠道',
            type: 'warning',
        })
        return
    }
    if (!everyform.payadmin) {
        ElMessage({
            message: '请选择收款账号',
            type: 'warning',
        })
        return
    }
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    ElMessageBox.confirm('确定开通吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            changeclientdetailmsgapi({
                id: companyId.value,
                auditStatus: basemsg.auditStatus,
                insureCompanyType: everyform.bxcompany,
                insureTypeList: everyform.bxtype,
                creditCode: basemsg.creditCode,
                legalPerson: basemsg.legalPerson,
                merchantBankCard: basemsg.merchantBankCard,
                area: basemsg.area,
                isOpenWesure: 1,
                channelId: everyform.payditch,
                receiptId: everyform.payadmin,
                companyName: companyName.value,
                productType: 2,
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    setmarketapi({
                        companyId: companyId.value,
                        id: daybasemsg_dealId.value,
                        productType: 2,
                        saleId: everyform.paySaleid,
                        serviceStartTime: `${y}-${m}-01`,
                        serviceState: 0,
                    }).then((res: any) => {
                        if (res.code == 200) {
                            getclientsdetail()
                            geteverydayinsuranceauditmsg()
                            ElMessage({
                                type: 'success',
                                message: '开通成功',
                            })
                        }
                    })
                }
            })
        })
        .catch(() => {
            console.log(111)
            getclientsdetail()
            geteverydayinsuranceauditmsg()
            ElMessage({
                type: 'info',
                message: '取消开通',
            })
        })
}
const surechangedaymsg = () => {
    if (!everyform.paySaleid) {
        ElMessage({
            type: 'warning',
            message: '请选择销售',
        })
        return
    }
    if (everyform.bxcompany.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择保险公司',
        })
        return
    }
    if (everyform.bxtype.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择投保方案',
        })
        return
    }
    if (!everyform.payditch) {
        ElMessage({
            message: '请选择收款渠道',
            type: 'warning',
        })
        return
    }
    if (!everyform.payadmin) {
        ElMessage({
            message: '请选择收款账号',
            type: 'warning',
        })
        return
    }
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    ElMessageBox.confirm('确定修改吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            changeclientdetailmsgapi({
                id: companyId.value,
                isOpenWesure: 1,
                auditStatus: basemsg.auditStatus,
                insureCompanyType: everyform.bxcompany,
                insureTypeList: everyform.bxtype,
                creditCode: basemsg.creditCode,
                legalPerson: basemsg.legalPerson,
                merchantBankCard: basemsg.merchantBankCard,
                area: basemsg.area,
                channelId: everyform.payditch,
                receiptId: everyform.payadmin,
                companyName: companyName.value,
                productType: 2,
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    if (everybasemsg_saleId.value === null) {
                        setmarketapi({
                            companyId: companyId.value,
                            id: daybasemsg_dealId.value,
                            productType: 2,
                            saleId: everyform.paySaleid,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code == 200) {
                                getclientsdetail()
                                geteverydayinsuranceauditmsg()
                                ElMessage({
                                    type: 'success',
                                    message: '开通成功',
                                })
                            }
                        })
                    } else {
                        changemarketapi({
                            companyId: companyId.value,
                            id: daybasemsg_dealId.value,
                            productType: 2,
                            saleId: everyform.paySaleid,
                            saleOldId: everybasemsg_saleId.value,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code == 200) {
                                getclientsdetail()
                                geteverydayinsuranceauditmsg()
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                            }
                        })
                    }
                }
            })
        })
        .catch(() => {
            console.log(111)
            getclientsdetail()
            geteverydayinsuranceauditmsg()
            ElMessage({
                type: 'info',
                message: '取消修改',
            })
        })
}
const changeeverybxcompany = (val: any) => {
    everyform.bxtype = []
    everyform.bxcompany = val
    geteverydayinsuranceaudittype(everyform.bxcompany)
    everyform.bxtype = []
}
const geteverydayinsuranceaudittype = (val: string) => {
    geteverydayinsuranceaudittypeapi(val).then((res) => {
        console.log(res, '121212')
        everybxtype.value = res
    })
}
const everybxtype = ref<any>([])
// 获取日日保保司
const geteverydayinsuranceaudicompanyt = () => {
    geteverydayinsuranceaudicompanytapi().then((res) => {
        console.log(res, 'testtest')
        dailybxcompany.value = res
    })
}
const dailybxcompany = ref<any>([])
const everyform = reactive<any>({
    paySaleid: null,
    payadmin: null,
    payditch: null,
    bxcompany: [],
    bxtype: [],
})
const longpaysubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
                longrechargeapi({
                    companyId: companyId.value,
                    payMode: longpayruleForm.payMode,
                    receiptId: longpayruleForm.receiptId,
                    rechargeAmount: longpayruleForm.rechargeAmount,
                    voucherUrl: longpayselectedImage.value?longpayselectedImage.value.split(',')[1]:'',
                }).then((res: any) => {
                    console.log(res)
                    if (res.code === 200) {
                        ElMessage({
                            message: '充值成功。',
                            type: 'success',
                        })
                        longpayresetForm(longpayruleFormRef.value)
                        getclientsdetail()
                        getlonginsuremsg()
                        getlongbasemsg()
                        getlongjoblist()
                        getlonginsurecompanylist()
                        getlongtimeinsuranceaudicompanyt()
                        getbuyinsurepeoplelist()
                        getfapiaomsg(3, invoiceDate.value)
                        dialoglongVisible.value = false
                    }
                })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const longpayresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
    dialoglongVisible.value = false
    longpayuploadRef.value.clearFiles()
    longpayselectedImage.value = null
}
const longpayruleFormRef = ref<FormInstance>()
const longfileInput = ref<any>(null)
const longhandleFileChange = () => {
    const file = longfileInput.value.files[0]
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        console.log(url)
        longpayimg.value = url
    }
    reader.readAsDataURL(file)
}
const longpayimg = ref('')
const longpayruleForm = reactive({
    rechargeAmount: 0,
    receiptId: '',
    payMode: '',
})
const longpay = () => {
    dialoglongVisible.value = true
    getditchskadmin()
}
const dialoglongVisible = ref(false)
const exportinsuredetail = () => {
    exportdayinsureRecordofinsurance(dayinsureprojectId.value)
}
const dayinsurestatuslist = ref<any>([])
const dayinsuredetailtc = ref(false)
const dayinsuredetail = (val: any) => {
    dayinsuredetailtc.value = true;
    (dayinsuredetailservicecompanyname.value = val.serveCompanyName),
        (dayinsuredetailinsurecomapnyname.value = val.insureCompany),
        (dayinsuredetailuseinsurenum.value = val.insurePeoples),
        (dayinsuredetailplanname.value = val.comboName),
        (dayinsuredetailplancode.value = val.comboCode),
        (dayinsuredetailuseinsuredate.value = val.insureDay),
        (dayinsureprojectId.value = val.projectId)
    getdayinsuredetail(val.projectId)
}
const dayinsuredetailservicecompanyname = ref('')
const dayinsuredetailinsurecomapnyname = ref('')
const dayinsuredetailuseinsurenum = ref('')
const dayinsuredetailplanname = ref('')
const dayinsuredetailplancode = ref('')
const dayinsuredetailuseinsuredate = ref('')
const dayinsureprojectId = ref(0)
const getdayinsuredetail = async (id: number) => {
    const res: any = await getdayinsuredetailapi({
        projectId: id,
    })
    console.log(res, '日日保投保记录详情')
    dayinsuredetaillist.value = res.list
}
const dayinsuredetaillist = ref<any>([])
const dayinsureexportone = (id: number) => {
    exportdayinsureRecordofinsurance(id)
}
const exportdayinsureRecordofinsurance = async (id: number) => {
    const res: any = await exportdayinsureRecordofinsuranceapi(id)
    console.log(res, '日日保投保记录单条导出')
    window.location.href =
        baseurl + '/common/download?delete=true&fileName=' + res
}
const changedayinsuretbjldate = (val: any) => {
    console.log(val)
    console.log(dayinsuretbjldate.value)
    getRecordofinsurance()
}
const getRecordofinsurance = async () => {
    const res: any = await getRecordofinsuranceapi({
        pageNum: dayinsuretbjlpagenum.value,
        pageSize: dayinsuretbjlpagesize.value,
        companyId: companyId.value,
        beginInsureDay:
            dayinsuretbjldate.value === null || dayinsuretbjldate.value === ''
                ? ''
                : dayinsuretbjldate.value[0],
        endInsureDay:
            dayinsuretbjldate.value === null || dayinsuretbjldate.value === ''
                ? ''
                : dayinsuretbjldate.value[1],
        insureCompanyType: 'insure002_gsc',
    })
    console.log(res, '获取投保记录列表')
    dayinsuretbjltotal.value = res.total
    dayinsuretbjltabledate.value = res.rows
}
const dayinsuretbjltabledate = ref<any>([])
const dayinsuretbjltotal = ref(0)
const dayinsuretbjlpagesize = ref(10)
const dayinsuretbjlpagenum = ref(1)
const changedayinsuretbjlpagesize = (val: any) => {
    dayinsuretbjlpagesize.value = val
    dayinsuretbjlpagenum.value = 1
    getRecordofinsurance()
}
const changedayinsuretbjlpagenum = (val: any) => {
    dayinsuretbjlpagenum.value = val
    getRecordofinsurance()
}
const dayinsuretbjldate = ref<any>([])
const teampqdwhandleSizeChange = (val: any) => {
    teampqdwpageSize.value = val
    teampqdwcurrentPage.value = 1
    getteaminsurecompanylist()
}
const teampqdwhandleCurrentChange = (val: any) => {
    teampqdwcurrentPage.value = val
    getteaminsurecompanylist()
}
const teampqdwpageSize = ref(10)
const teampqdwcurrentPage = ref(1)
const teampqdwtotal = ref(0)
const teampqdwtableData = ref<any>([])
const changeteamhyok = () => {
    console.log(teamhy.value)
    console.log(teamhylist.value)
    const jobname: any = []
    teamhylist.value.forEach((ele: any, i: number) => {
        teamhy.value.forEach((item: any, i: number) => {
            if (item === ele.id) {
                jobname.push(ele.industryName)
            }
        })
    })
    changedayandteamhy(1, teamservicecompanyid.value, jobname, teamhy.value)
}
const changeteamhy = async (ele: any) => {
    zcids.value = []
    await getdayinsurejoblist(1)
    if (!ele.wesureInfo.industryIds) {
        teamhy.value = []
    } else {
        const infoarr = JSON.parse(ele.wesureInfo.industryIds)
        let arr: any = []
        const hylistids: any = []
        teamhylist.value.forEach((j: any, k: any) => {
            hylistids.push(j.id)
        })
        // 使用 filter 方法过滤 arr1 中的元素，检查它们是否在 hylistids 中
        arr = infoarr.filter((item: any) => hylistids.includes(item))
        // 使用 filter 方法过滤 arr1 中的元素，检查它们是否不在 hylistids 中
        zcids.value = infoarr.filter((item: any) => !hylistids.includes(item))
        teamhy.value = arr
    }
    teamservicecompanyid.value = ele.id
    dialogteamchangehyVisible.value = true
}
const teamservicecompanyid = ref(0)
const changedayhyok = () => {
    const jobname: any = []
    dayhylist.value.forEach((ele: any, i: number) => {
        dayhy.value.forEach((item: any, i: number) => {
            if (item === ele.id) {
                jobname.push(ele.industryName)
            }
        })
    })
    console.log(jobname, dayhylist.value, dayhy.value)
    changedayandteamhy(0, dayservicecompanyid.value, jobname, dayhy.value)
}
const zcids = ref<any>([])
const changedayandteamhy = async (
    productType: any,
    hyserveCompanyId: any,
    industryIdList: any,
    arrids: any
) => {
    const res: any = await changedayandteamhyapi({
        productType: productType,
        serveCompanyId: hyserveCompanyId,
        industryIds: JSON.stringify([
            ...new Set([...arrids, ...new Set(zcids.value)]),
        ]),
        industryName: industryIdList.join(','),
    })
    console.log(res, '修改团意保日日保行业')
    if (res.code === 200) {
        ElMessage({
            message: res.msg,
            type: 'success',
        })
        if (productType === 0) {
            getdayinsurecompanylist()
            changedayhycancel()
        } else if (productType === 1) {
            getteaminsurecompanylist()
            changeteamhycancel()
        }
    }
}
const changeteamhycancel = () => {
    teamhy.value = []
    dialogteamchangehyVisible.value = false
}
const dialogteamchangehyVisible = ref(false)
const teamhy = ref([])
const dayservicecompanyid = ref(0)
const changedayhycancel = () => {
    dayhy.value = []
    dialogdaychangehyVisible.value = false
}
const daycheckno = (val: any) => {
    console.log(val)
    const cval = val
    cval.auditStatus = 2
    cval.insureCompanyType = 'insure002_gsc'
    dayinsurecheckdispatchingAgencyapi(cval).then((res: any) => {
        if (res.code === 200) {
            ElMessage({
                message: '操作成功',
                type: 'success',
            })
            getdayinsurecompanylist()
        }
    })
}
// 获取团意保企业列表
const getteaminsurecompanylist = async () => {
    const res: any = await getdayinsurecompanylistapi({
        insureCompanyType: 'insure002_gsc',
        auditStatus: teamcheckstatus.value,
        serveCompanyName: teamdispatchingagency.value,
        companyId: companyId.value,
        pageSize: teampqdwpageSize.value,
        pageNumber: teampqdwcurrentPage.value,
        productType: 1,
    })
    console.log(res, '获取团意保企业列表')
    teampqdwtotal.value = res.total
    teampqdwtableData.value = res.rows
}
const teamdispatchingagency = ref('')
const teamcheckstatus = ref('')
const daycheckok = (val: any) => {
    console.log(val)
    const cval = val
    cval.insureCompanyType = 'insure002_gsc'
    cval.auditStatus = 1
    dayinsurecheckdispatchingAgencyapi(val).then((res: any) => {
        if (res.code === 200) {
            ElMessage({
                message: '操作成功',
                type: 'success',
            })
            getdayinsurecompanylist()
        }
    })
}
const changedayhy = async (ele: any) => {
    zcids.value = []
    await getdayinsurejoblist(0)
    if (!ele.wesureInfo.industryIds) {
        dayhy.value = []
    } else {
        const infoarr = JSON.parse(ele.wesureInfo.industryIds)
        console.log(dayhylist.value)
        let arr: any = []
        const hylistids: any = []
        dayhylist.value.forEach((j: any, k: any) => {
            hylistids.push(j.id)
        })
        // 使用 filter 方法过滤 arr1 中的元素，检查它们是否在 hylistids 中
        arr = infoarr.filter((item: any) => hylistids.includes(item))
        // 使用 filter 方法过滤 arr1 中的元素，检查它们是否不在 hylistids 中
        zcids.value = infoarr.filter((item: any) => !hylistids.includes(item))
        dayhy.value = arr
    }
    dayservicecompanyid.value = ele.id
    dialogdaychangehyVisible.value = true
}
const dialogdaychangehyVisible = ref(false)
// 获取日日保团意保行业数据
const getdayinsurejoblist = async (productType: any) => {
    const res: any = await getdayinsurejoblistapi({
        isDelete: 0,
        productType: productType,
    })
    console.log(res, '获取日日保团意保行业数据')
    if (productType === 0) {
        dayhylist.value = res.rows
    } else if (productType === 1) {
        teamhylist.value = res.rows
    }
}
const teamhylist = ref<any>([])
const dayhylist = ref<any>([])
const dayhy = ref([])
const lookdayvidio = (url: any) => {
    console.log(url)
    diavideoVisible.value = true
    videolist.value = url
}
const changedaydispatchingagency = () => {
    shake(getdayinsurecompanylist, 400)
}
const changeteamdispatchingagency = () => {
    shake(getteaminsurecompanylist, 400)
}
// 获取日日保企业列表
const getdayinsurecompanylist = async () => {
    const res: any = await getdayinsurecompanylistapi({
        insureCompanyType: 'insure002_gsc',
        auditStatus: daycheckstatus.value,
        serveCompanyName: daydispatchingagency.value,
        companyId: companyId.value,
        pageSize: daypageSize.value,
        pageNumber: daycurrentPage.value,
        productType: 0,
    })
    console.log(res, '获取日日保企业列表')
    daytotal.value = res.total
    daytableData.value = res.rows
}
const daydispatchingagency = ref('')
const daycheckstatus = ref('')
const daytableData = ref<any>([])
const daypageSize = ref(10)
const daycurrentPage = ref(1)
const daytotal = ref(0)
const dayhandleCurrentChange = (e: any) => {
    console.log(e)
    daycurrentPage.value = e
    getdayinsurecompanylist()
}
const dayhandleSizeChange = (e: any) => {
    console.log(e)
    daypageSize.value = e
    getdayinsurecompanylist()
}
const changedayclockvalue = (val: any) => {
    if (dayclockvalue.value === true) {
        if (val === false) {
            dayblackvalue.value = true
        } else {
            dayblackvalue.value = true
        }
    }
}
const changedayblackvalue = (val: any) => {
    if (val === true) {
        dayblackvalue.value = true
    }
}
const datinsureadminset = async () => {
    const res: any = await datinsureadminsetapi({
        antiDatedPolicy: daydtbvalue.value ? 1 : 0,
        blockedAccount: dayblackvalue.value ? 1 : 0,
        companyId: companyId.value,
        refusalGuaranteeStatus: dayclockvalue.value ? 1 : 0,
    })
    console.log(res, ' 日日保账户设置')
    if (res.code === 200) {
        longsetadmintc.value = false
        ElMessage({
            type: 'success',
            message: '修改成功',
        })
        geteverydayinsuranceauditmsg()
    }
}
const longsetadminsure = () => {
    datinsureadminset()
}
const longsetadmincancel = () => {
    longsetadmintc.value = false
    dayclockvalue.value = false
    daydtbvalue.value = false
    dayblackvalue.value = false
}
const dayclockvalue = ref(false)
const daydtbvalue = ref(false)
const dayblackvalue = ref(false)
const longsetadmintcopen = () => {
    longsetadmintc.value = true
    daydtbvalue.value = longisdtb.value === 0 ? false : true
    dayclockvalue.value = longisrejectinsure.value === 0 ? false : true
    dayblackvalue.value = dayinsureblockedAccount.value === 0 ? false : true
}
const longsetadmintc = ref(false)
const Rateofclaimtcopen = () => {
    Rateofclaimtc.value = true
    getdayRateofclaim()
}
const getdayRateofclaim = async () => {
    const res: any = await getdayRateofclaimapi({
        companyId: companyId.value,
        queryType: 2,
    })
    console.log(res, '日日保查看理赔率')
    Rateofclaimmsg.value = res.rows[0]
}
const isopendayinsure = ref(0)
const Rateofclaimmsg = ref<any>([])
const Rateofclaimtc = ref(false)
const daybasemsg_dealId = ref(0)
const geteverydayinsuranceauditmsg = async () => {
    const res: any = await geteverydayinsuranceauditmsgapi(companyId.value)
    console.log(res, '日日保基本信息')
    isopendayinsure.value = res.isOpenWesure
    dayinsureopentime.value = res.productOpenTime
    dayinsureosalename.value = res.salesName
    dayinsurezhye.value = res.wesureBalance
    dayinsureblockedAccount.value = res.blockedAccount
    dayinsureCompanyName.value = res.insureCompanyName
    datinsureClaimRate.value = res.insureClaimRate
    dayinsureIncreaseRate.value = res.insureIncreaseRate
    longisrejectinsure.value = res.refusalGuaranteeStatus
    longisdtb.value = res.antiDatedPolicy
    everybasemsg_saleId.value = res.saleId
    everyform.paySaleid = res.saleId
    daybasemsg_dealId.value = res.dealId
    everyform.payditch = res.channelId
    everyform.payadmin = res.receiptId
    getditchskadminapi(everyform.payditch).then((res: any) => {
        console.log(res, 1112)
        payadminlist.value = res.list
        skzhlistday.value = res.list
    })
    if (res.insureCompanyType === null || res.insureCompanyType === '') {
        everyform.bxcompany = ''
        everyform.bxtype = []
    } else {
        everyform.bxcompany = res.insureCompanyType
        geteverydayinsuranceaudittype(res.insureCompanyType)
        everyform.bxtype = JSON.parse(res.insureType).map(
            (ele: any, i: any) => {
                return ele.dictValue
            }
        )
    }
}
const everybasemsg_saleId = ref(0)
const longisdtb = ref(0)
const longisrejectinsure = ref(0)
const dayinsureblockedAccount = ref(0)
const dayinsureopentime = ref('')
const dayinsureosalename = ref('')
const dayinsurezhye = ref(0)
const dayinsureCompanyName = ref('')
const datinsureClaimRate = ref(0)
const dayinsureIncreaseRate = ref(0)
const invoiceform = reactive({
    receiptId: null,
    paySaleid: null,
})
const changeinvocetab = (val: number) => {
    invoicetabflag.value = val
    if (val === 0) {
        getnoallinvoicelist()
    } else if (val === 1) {
        getokallinvoicelist()
    }
}
const invoicetabflag = ref(0)
const allinvoicelisttc = ref(false)
const allinvoicelisttcopen = () => {
    allinvoicelisttc.value = true
    getalladmin()
    getnoallinvoicelist()
    getokallinvoicelist()
}
const closeallinvoicelisttc = () => {
    allinvoicelisttc.value = false
}
const setrebatetc = ref(false)
const updatelonginsurefl = async () => {
    const res: any = await updatelonginsureflapi({
        companyId: companyId.value,
        openRebate: rebatevalue.value === true ? 1 : 0,
    })
    console.log(res, '修改返利状态')
    if (res.code === 200) {
        ElMessage({
            type: 'success',
            message: '修改成功',
        })
        setrebatecancel()
        getlongbasemsg()
    }
}
const setrebatesure = () => {
    updatelonginsurefl()
}
const setrebatecancel = () => {
    setrebatetc.value = false
    rebatevalue.value = false
}
const rebatevalue = ref(false)
const updateflstatus = () => {
    setrebatetc.value = true
    rebatevalue.value = longbasemsg_openRebate.value === 1 ? true : false
}
const onChange = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    invoicefileList.value = fileListVal
}
const invoicelistonChange = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    invoicefileList.value = fileListVal
}
const moreinvoicelistonChange = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    moreinvoicefileList.value = fileListVal
}
const beforeRemove = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    invoicefileList.value = fileListVal
}
const invoicelistbeforeRemove = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    invoicefileList.value = fileListVal
}
const moreinvoicelistbeforeRemove = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    moreinvoicefileList.value = fileListVal
}
const fileList = ref([])
const invoicefileList = ref([])
const moreinvoicefileList = ref([])
const dayonChange = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    dayfileList.value = fileListVal
}
const daybeforeRemove = (file: any, fileListVal: any) => {
    console.log(fileListVal)
    dayfileList.value = fileListVal
}
const dayfileList = ref([])
const beforeUploadfp = (val: any) => {
    console.log(val)
}
const daybeforeUploadfp = (val: any) => {
    console.log(val)
}
const invoicerlistbeforeUploadfp = (val: any) => {
    console.log(val)
}
const moreinvoicerlistbeforeUploadfp = (val: any) => {
    console.log(val)
}
const uploadfp = ref()
const dayuploadfp = ref()
const invoicelistuploadtcref = ref()
const moreinvoicelistuploadtcref = ref()
const opuploadfptc = () => {
    uploadfptc.value = true
}
const dayopuploadfptc = () => {
    dayuploadfptc.value = true
}
const uploadfpcancel = () => {
    uploadfptc.value = false
    uploadfp.value.clearFiles()
}
const uploadfpsure = () => {
    console.log(uploadfp.value)
    uploadfp.value.submit()
    uploadfp.value.clearFiles()
    ElMessage({
        type: 'success',
        message: '上传成功',
    })
    uploadfptc.value = false
    getfapiaomsg(3, invoiceDate.value)
}
const dayuploadfpcancel = () => {
    dayuploadfptc.value = false
    dayuploadfp.value.clearFiles()
}
const invoicelistuploadfpcancel = () => {
    invoicelistuploadtc.value = false
    invoicelistuploadtcref.value.clearFiles()
}
const moreinvoicelistuploadfpcancel = () => {
    moreinvoicelistuploadtc.value = false
    moreinvoicelistuploadtcref.value.clearFiles()
}
const dayuploadfpsure = () => {
    console.log(dayuploadfp.value)
    dayuploadfp.value.submit()
    dayuploadfp.value.clearFiles()
    ElMessage({
        type: 'success',
        message: '上传成功',
    })
    dayuploadfptc.value = false
    getfapiaomsg(0, dayinvoiceDate.value)
}
const invoicelistuploadfpsure = () => {
    invoicelistuploadtcref.value.submit()
    invoicelistuploadtcref.value.clearFiles()
    ElMessage({
        type: 'success',
        message: '上传成功',
    })
    invoicelistuploadtc.value = false
    getnoallinvoicelist()
    getokallinvoicelist()
}
const moreinvoicelistuploadfpsure = () => {
    moreinvoicelistuploadtcref.value.submit()
    moreinvoicelistuploadtcref.value.clearFiles()
    moreinvoicelistuploadtc.value = false
    getnoallinvoicelist()
    getokallinvoicelist()
}
const handleUploadError = async (err: any, file: any, fileList: any) => {
    //文件上传失败后的操作
    console.log(err, file, fileList)
}
const uploadfptc = ref(false)
const dayuploadfptc = ref(false)
const exportlongfp = () => {
    getinvoice(3, invoiceDate.value)
}
const dayexportlongfp = () => {
    getinvoice(0, dayinvoiceDate.value)
}
const getinvoice = async (type: any, date: any) => {
    const res: any = await getinvoiceapi({
        type: type,
        month: date,
        status: invoicestatus.value,
        companyName: companyName.value,
    })
    console.log(res, '下载发票')
    window.location.href =
        baseurl + '/common/download?delete=true&fileName=' + res
}
const changeinvoiceDate = (val: any) => {
    getfapiaomsg(3, invoiceDate.value)
}
const daychangeinvoiceDate = (val: any) => {
    getfapiaomsg(0, dayinvoiceDate.value)
}
const noinvoiceflag = ref(false)
const invoiceDate = ref<any>('')
const dayinvoiceDate = ref<any>('')
const getfapiaomsg = async (t: any, date: any) => {
    const res: any = await getfapiaomsgapi({
        type: t,
        month: date,
        companyId: companyId.value,
    })
    console.log(res, '发票信息')
    if (res === 'null') {
        console.log('没有发票')
        noinvoiceflag.value = true
    } else {
        console.log(res)
        uploadfpid.value = res.id
        noinvoiceflag.value = false
        invoicestatus.value = res.status
        invoicesprice.value = res.amount
        invoicesapplyTime.value = res.applyTime
        invoiceUrl.value = res.invoiceUrl
        invoicecheckstatus.value = res.checkStatus
    }
}
const uploadfpid = ref(0)
const lookinvoice = () => {
    window.location.href = invoiceUrl.value
}
const lookdayinvoice = () => {
    window.location.href = invoiceUrl.value
}
const invoicestatus = ref(0)
const invoicecheckstatus = ref(0)
const invoicesprice = ref(0)
const invoicesapplyTime = ref('')
const invoiceUrl = ref('')
const longbxtype = ref<any>([])
const changelongtimecompany = async (val: any) => {
    console.log(val)
    longbxtype.value = []
    val.forEach((ele: any, index: any) => {
        getlongtimeinsuranceaudittypeapi(ele).then((res: any) => {
            res.forEach((j: any, i: number) => {
                j.dictValue = ele + '======' + j.dictValue
            })
            longbxtype.value.push(...res)
        })
    })
    await wait(200)
    // console.log(longbxtype.value);
    var arr = longbxtype.value.map((item: any, i: any) => {
        return item.dictValue
    })
    var newarr: any = []
    longform.bxtype.forEach((ele: any, index: any) => {
        var flag = arr.findIndex((val: any, i: any) => {
            return val === ele
        })
        if (flag !== -1) {
            // console.log(ele);
            newarr.push(ele)
        }
    })
    longform.bxtype = newarr
}
const changelonginsuretbryid = () => {
    shake(getbuyinsurepeoplelist, 400)
}
const changelonginsuretbryname = () => {
    shake(getbuyinsurepeoplelist, 400)
}
const changelonginsuretbrypqdw = () => {
    shake(getbuyinsurepeoplelist, 400)
}
const changelonginsurebs = (val: any) => {
    console.log(val.target._value)
    longinsuretbrybsfa.value = ''
    getlongtimeinsuranceaudittype(val.target._value)
    getbuyinsurepeoplelist()
}
const getlongtimeinsuranceaudicompanyt = () => {
    getlongtimeinsuranceaudicompanytapi().then((res: any) => {
        console.log(res, '保司')
        longinsurebslist.value = res
    })
}
const getlongtimeinsuranceaudittype = async (code: any) => {
    const res: any = await getlongtimeinsuranceaudittypeapic({
        insureCompany: code,
        companyId: companyId.value,
    })
    console.log(res, '保司查方案')
    const arr = res.map((ele: any, i: number) => {
        return ele.dictLabel.split('-')[0]
    })
    console.log(arr, 'arararar')
    for (var i = 0; i < arr.length; i++) {
        for (var j = 0; j < arr.length; j++) {
            if (arr[i] == arr[j] && i != j) {
                //将后面重复的数删掉
                arr.splice(j, 1)
            }
        }
    }
    longinsurebsfa.value = arr
}

const longinsurebsfa = ref<any>([])
const longinsurebslist = ref<any>([])
const getbuyinsurepeoplelist = async () => {
    const res: any = await getbuyinsurepeoplelistapi({
        pageNum: longinsuretbrypageNum.value,
        pageSize: longinsuretbrypageSize.value,
        companyId: companyId.value,
        insurCompany: longinsuretbrybsmc.value,
        insurStartTime: longinsuretbrykssj.value,
        insurEndTime: longinsuretbryjssj.value,
        isDelete: 0,
        companyPlanName: longinsuretbrybsfa.value,
        serveCompanyName: longinsuretbrypqdw.value,
        userName: longinsuretbryname.value,
        idCardNo: longinsuretbryid.value,
        occupationLevel: longinsuretbrykhfxdj.value,
        occupationOriginLevel: longinsuretbrybsfxdj.value,
        policyStatus: longinsuretbrybxzt.value,
        isMonthMode: longinsuretbryydms.value,
    })
    console.log(res, '查询投保人员列表')
    longinsuretbrylist.value = res.rows
    longinsuretbrytotal.value = res.total
}
const longinsuretbrytotal = ref(0)
const longinsuretbrypageSize = ref(10)
const longinsuretbrypageNum = ref(1)
const changelonginsuretbrypageSize = (val: any) => {
    longinsuretbrypageNum.value = 1
    longinsuretbrypageSize.value = val
    getbuyinsurepeoplelist()
}
const changelonginsuretbrypageNum = (val: any) => {
    longinsuretbrypageNum.value = val
    getbuyinsurepeoplelist()
}
const clearlonginsuretbryform = () => {
    longinsuretbrypqdw.value = ''
    longinsuretbrybsmc.value = ''
    longinsuretbrybsfa.value = ''
    longinsuretbrykhfxdj.value = ''
    longinsuretbrybsfxdj.value = ''
    longinsuretbryydms.value = ''
    longinsuretbrybxzt.value = ''
    longinsuretbryname.value = ''
    longinsuretbryid.value = ''
    longinsuretbrydcsj.value = []
    longinsuretbrykssj.value = ''
    longinsuretbryjssj.value = ''
    getbuyinsurepeoplelist()
}
const longinsuretbrylist = ref<any>([])
const longinsuretbrypqdw = ref('')
const longinsuretbrybsmc = ref('')
const longinsuretbrybsfa = ref('')
const longinsuretbrykhfxdj = ref('')
const longinsuretbrybsfxdj = ref('')
const longinsuretbryydms = ref('')
const longinsuretbrybxzt = ref('')
const longinsuretbryname = ref('')
const longinsuretbryid = ref('')
const longinsuretbrydcsj = ref<any>([])
const longinsuretbrykssj = ref('')
const longinsuretbryjssj = ref('')
const beforeUpload = (file: UploadRawFile) => {
    const type = ['video/mp4']
    if (type.indexOf(file.type) === -1) {
        ElMessage.error('上传的文件必须是视频')
        return false
    }
    return true
}
const longrejectcancel = () => {
    jbtextarea.value = ''
    dialogjbVisible.value = false
}
const longrejectsure = () => {
    if (jbtextarea.value === '') {
        ElMessage.error('请输入拒保理由.')
        return
    }
    longdispatchingagencycheck(
        3,
        jbjoblist.value,
        jbtextarea.value,
        carea.value
    )
    longrejectcancel()
}
const jbtextarea = ref('')
const atpresent = ref(0)
const prev = () => {
    console.log(1)
    if (atpresent.value <= 0) {
        return
    } else {
        atpresent.value = atpresent.value - 1
    }
}
const next = () => {
    console.log(2)
    if (atpresent.value >= videolist.value.length - 1) {
        return
    } else {
        atpresent.value = atpresent.value + 1
    }
}
const longdispatchingagencycheck = async (
    status: any,
    occupationIds: any,
    remark: any,
    area: any
) => {
    const res: any = await longdispatchingagencycheckapi({
        ...checkservicecompanyform,
        userType: 2,
        area: area,
        status: status,
        occupationIds: JSON.stringify(occupationIds),
        remark: remark,
    })
    console.log(res)
    if (res.code === 200) {
        getlonginsurecompanylist()
        ElMessage({
            message: res.msg,
            type: 'success',
        })
    }
}
const longservicecompanysure = () => {
    if (longjobcheckList.value.length === 0) {
        ElMessage.error('至少选择一项工种类型.')
        return
    }
    const arr: any = []
    longjobcheckList.value.forEach((ele: any, i: any) => {
        arr.push(ele.id)
    })
    longdispatchingagencycheck(
        islongserviceedit.value === true ? longservicecompanystatus.value : 1,
        arr,
        tbyd.value,
        tbsharea.value
    )
    longservicecompanycancel()
}
const longbhsure = () => {
    if (bhtextarea.value === '') {
        ElMessage.error('请输入驳回理由.')
        return
    }
    longdispatchingagencycheck(2, [], bhtextarea.value, carea.value)
    longbhcancel()
}
const longbhcancel = () => {
    dialogbhVisible.value = false
    bhtextarea.value = ''
}
const bhtextarea = ref('')
const longservicecompanycancel = () => {
    dialogcheckpqdwokVisible.value = false
    longjobcheckList.value = []
    tbyd.value = ''
    area.value = ''
    jobtypekey.value = ''
    getlonginsurecompanylist()
}
const delselectedlongjob = (i: any) => {
    longjobcheckList.value.splice(i, 1)
}
const jobinfolist = ref<any>([])
// 获取长期保工种列表
const getlongjoblist = async () => {
    const res: any = await getlongjoblistapi({
        pageNum: 1,
        pageSize: 9999,
    })
    console.log(res, '获取长期保工种列表')
    res.rows.forEach((ele: any, index: number) => {
        jobinfolist.value.push(...ele.occupationList)
    })
    res.rows.forEach((ele: any, i: any) => {
        ele.occupationList.forEach((j: any, index: any) => {
            j.insurCompanyOccupationList = null
        })
    })
    joblist.value = res.rows
    jobtabid.value = res.rows[0].id
}
const changejobtab = (i: any, id: any) => {
    console.log(id, 'id')
    jobtabflag.value = i
    jobtabid.value = id
}
const jobtabid = ref(0)
const jobtabflag = ref(0)
const jobtypekey = ref('')
// 全国省份数据
const provincelist = ref([
    {label: '北京', value: '北京'},
    {label: '天津', value: '天津'},
    {label: '河北', value: '河北'},
    {label: '山西', value: '山西'},
    {label: '内蒙古', value: '内蒙古'},
    {label: '辽宁', value: '辽宁'},
    {label: '吉林', value: '吉林'},
    {label: '黑龙江', value: '黑龙江'},
    {label: '上海', value: '上海'},
    {label: '江苏', value: '江苏'},
    {label: '浙江', value: '浙江'},
    {label: '安徽', value: '安徽'},
    {label: '福建', value: '福建'},
    {label: '江西', value: '江西'},
    {label: '山东', value: '山东'},
    {label: '河南', value: '河南'},
    {label: '湖北', value: '湖北'},
    {label: '湖南', value: '湖南'},
    {label: '广东', value: '广东'},
    {label: '广西', value: '广西'},
    {label: '海南', value: '海南'},
    {label: '重庆', value: '重庆'},
    {label: '四川', value: '四川'},
    {label: '贵州', value: '贵州'},
    {label: '云南', value: '云南'},
    {label: '西藏', value: '西藏'},
    {label: '陕西', value: '陕西'},
    {label: '甘肃', value: '甘肃'},
    {label: '青海', value: '青海'},
    {label: '宁夏', value: '宁夏'},
    {label: '新疆', value: '新疆'},
    {label: '台湾', value: '台湾'},
    {label: '香港', value: '香港'},
    {label: '澳门', value: '澳门'},
])
const joblist = ref<any>([])
const longserviceckeckok = (ele: any) => {
    islongserviceedit.value = false
    checkservicecompanyform.id = ele.id
    checkservicecompanyform.companyName = ele.companyName
    checkservicecompanyform.companyId = ele.companyId
    checkservicecompanyform.serveCompanyName = ele.serveCompanyName
    checkservicecompanyform.serveCompanyId = ele.serveCompanyId
    dialogcheckpqdwokVisible.value = true
}
const dialogbhVisible = ref(false)
const longserviceckeckno = (ele: any) => {
    dialogbhVisible.value = true
    checkservicecompanyform.id = ele.id
    checkservicecompanyform.companyName = ele.companyName
    checkservicecompanyform.companyId = ele.companyId
    checkservicecompanyform.serveCompanyName = ele.serveCompanyName
    checkservicecompanyform.serveCompanyId = ele.serveCompanyId
    carea.value = ele.area
}
const longserviceckeckedit = (ele: any) => {
    console.log(ele.occupationList, '111')
    if (ele.occupationList === null || ele.occupationList === []) {
        longjobcheckList.value = []
    } else {
        ele.occupationList.forEach((ele: any, index: any) => {
            ele.periodIndustryName = null
        })
        longjobcheckList.value = ele.occupationList
    }
    tbyd.value = ele.remark
    tbsharea.value = ele.area
    islongserviceedit.value = true
    longservicecompanystatus.value = ele.status
    checkservicecompanyform.id = ele.id
    checkservicecompanyform.companyName = ele.companyName
    checkservicecompanyform.companyId = ele.companyId
    checkservicecompanyform.serveCompanyName = ele.serveCompanyName
    checkservicecompanyform.serveCompanyId = ele.serveCompanyId
    dialogcheckpqdwokVisible.value = true
}
const longservicecompanystatus = ref(0)
const longserviceckeckreject = (ele: any) => {
    console.log(ele.occupationList)
    const arr: any = []
    ele.occupationList.forEach((ele: any, i: any) => {
        arr.push(ele.id)
    })
    jbjoblist.value = arr
    checkservicecompanyform.id = ele.id
    checkservicecompanyform.companyName = ele.companyName
    checkservicecompanyform.companyId = ele.companyId
    checkservicecompanyform.serveCompanyName = ele.serveCompanyName
    checkservicecompanyform.serveCompanyId = ele.serveCompanyId
    dialogjbVisible.value = true
    carea.value = ele.area
}
const jbjoblist = ref([])
const longserviceckeckrejectback = (ele: any) => {
    const list = JSON.parse(JSON.stringify(ele.occupationList))
    list.forEach((ele: any, index: any) => {
        ele.periodIndustryName = null
    })
    longjobcheckList.value = list
    tbyd.value = ele.remark
    tbsharea.value = ele.area
    islongserviceedit.value = false
    checkservicecompanyform.id = ele.id
    checkservicecompanyform.companyName = ele.companyName
    checkservicecompanyform.companyId = ele.companyId
    checkservicecompanyform.serveCompanyName = ele.serveCompanyName
    checkservicecompanyform.serveCompanyId = ele.serveCompanyId
    dialogcheckpqdwokVisible.value = true
}
const checkservicecompanyform = reactive({
    id: 0,
    serveCompanyName: '',
    companyId: 0,
    companyName: '',
    serveCompanyId: 0,
})
const islongserviceedit = ref(false)
const longjobcheckList = ref<any>([])
const tbyd = ref('')
const dialogcheckpqdwokVisible = ref(false)
const dialogjbVisible = ref(false)
const tbsharea = ref('')
const carea = ref('')
const longaddvideosure = () => {
    console.log(longaddvideodate)
    const cdate: any = longaddvideodate
    cdate.params.videos = addfilename.value
    longaddvideoapi(cdate).then((res: any) => {
        console.log(res, '长期保添加视频')
        if (res.code === 200) {
            ElMessage.success('操作成功')
            longaddvideocancel()
        }
    })
}
const uploadAction = (option: any) => {
    const param = new FormData()
    param.append('file', option.file)
    longuploadvideoapi(param).then((res: any) => {
        console.log(res, '上传视频')
        ElMessage.success('视频上传成功！')
        addfilename.value = res.fileUrl
    })
}
const uploadFile = ref()
const uploadEle = ref()
const addfilename = ref('')
const longaddvideocancel = () => {
    dialogaddvideoVisible.value = false
    uploadEle.value.clearFiles()
    getlonginsurecompanylist()
}
const longaddvideo = (ele: any) => {
    dialogaddvideoVisible.value = true
    longaddvideodate = ele
}
let longaddvideodate = reactive<any>({})
const looklongvidio = (url: any) => {
    videolist.value = url
    atpresent.value = 0
    diavideoVisible.value = true
}
const diavideoVisible = ref(false)
const dialogaddvideoVisible = ref(false)
const videolist = ref([])
const changelonginsuretbshpageNum = (val: any) => {
    longinsuretbshpageNum.value = val
    getlonginsurecompanylist()
}
const changelonginsuretbshpageSize = (val: any) => {
    longinsuretbshpageNum.value = 1
    longinsuretbshpageSize.value = val
    getlonginsurecompanylist()
}
const changelongdispatchingagency = () => {
    shake(getlonginsurecompanylist, 300)
}
// 获取长期保企业列表
const getlonginsurecompanylist = async () => {
    const res: any = await getlonginsurecompanylistapi({
        pageNum: longinsuretbshpageNum.value,
        pageSize: longinsuretbshpageSize.value,
        status: longinsuretbshcheckstatus.value,
        companyId: companyId.value,
        serveCompanyName: longinsuretbshdispatchingagency.value,
        openApiCompanyId: '',
    })
    console.log(res, '获取长期保企业列表')
    longinsuretbshtotal.value = res.total
    longinsuretbshtableData.value = res.list
}
const longinsuretbshpageNum = ref(1)
const longinsuretbshpageSize = ref(10)
const longinsuretbshcheckstatus = ref('')
const longinsuretbshdispatchingagency = ref('')
const longinsuretbshtotal = ref(0)
const longinsuretbshtableData = ref<any>([])
const closeaddlonginsurehistorytc = () => {
    addlonginsurehistorytc.value = false
}
const rechargebullrules = reactive<FormRules>({
    Purchasemonth: [
        {
            required: true,
            message: '请选择购买月份',
            trigger: 'change',
        },
    ],
    Salesscenario: [
        {
            required: true,
            message: '请选择销售场景',
            trigger: 'change',
        },
    ],
    accounttobecredited: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
    paytype: [
        {
            required: true,
            message: '请选择付款方式',
            trigger: 'change',
        },
    ],
    Amountofservice: [
        {required: true, message: '请输入服务金额', trigger: 'blur'},
    ],
    seatnum: [{required: true, message: '请输入席位数量', trigger: 'blur'}],
    date: [
        {
            type: 'date',
            required: true,
            message: '请选择日期',
            trigger: 'change',
        },
    ],
    xwdate: [
        {
            type: 'date',
            required: true,
            message: '请选择日期',
            trigger: 'change',
        },
    ],
})
const rechargebullsubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate(async (valid, fields) => {
        if (valid) {
            if (
                (bullpayselectedImage.value === null &&
                    bullruleFormrecharge.paytype !== 4) ||
                (bullpayselectedImage.value === '' &&
                    bullruleFormrecharge.paytype !== 4)
            ) {
                ElMessage.error('请上传支付凭证')
            } else {
                await confirm('提示', createVNode('span', null, [
                    '充值动作不可逆，本次充值',
                    createVNode('strong', {
                        style: {
                            color: 'red'
                        }
                    }, bullruleFormrecharge.Amountofservice),
                    '元，确认充值？'
                ]))
                bulletpayrechargeapi({
                    companyId: companyId.value,
                    accountExpireTime: new Date(bullruleFormrecharge.date),
                    payMode: bullruleFormrecharge.paytype,
                    payMoney: bullruleFormrecharge.Amountofservice,
                    receiptId: bullruleFormrecharge.accounttobecredited,
                    salesScenario: bullruleFormrecharge.Salesscenario,
                    rechargeAmount: bullruleFormrecharge.Purchasemonth,
                    voucherUrl:
                        bullpayselectedImage.value === null ||
                        bullpayselectedImage.value === ''
                            ? ''
                            : bullpayselectedImage.value.split(',')[1],
                    openAccountMoney: 0,
                    remark: bullruleFormrecharge.remark,
                    buySeatCount:
                        bullruleFormrecharge.Salesscenario === '2' ||
                        bullruleFormrecharge.Salesscenario === '3' ||
                        bullruleFormrecharge.Salesscenario === '4'
                            ? bullruleFormrecharge.seatnum
                            : 0,
                    seatExpireTime: new Date(bullruleFormrecharge.xwdate),
                }).then((res: any) => {
                    console.log(res)
                    if (res.code === 200) {
                        getditch()
                        getclientsdetail()
                        getteam(companyId.value)
                        getbulletpayrollmsg()
                        getzhmxlist()
                        dialogbulletVisible.value = false
                        rechargebullresetForm(rechargebullruleFormRef.value)
                        ElMessage({
                            message: '充值成功。',
                            type: 'success',
                        })
                    }
                })
            }
        } else {
            console.log('error submit!', fields)
        }
    })
}
const rechargebullresetForm = (formEl: FormInstance | undefined) => {
    dialogbulletVisible.value = false
    if (!formEl) return
    formEl.resetFields()
    bullpayuploadRef.value.clearFiles()
    bullpayselectedImage.value = null
}
const delchoosefile = () => {
    payimg.value = ''
}
const rechargebullruleFormRef = ref<FormInstance>()
const fileInput = ref<any>()
const handleFileChange = () => {
    console.log(fileInput.value)
    const file = fileInput.value.files[0]
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        // console.log(url);
        payimg.value = url
    }
    reader.readAsDataURL(file)
}
const payimg = ref('')
const changesendfreetime = (val: any) => {
    console.log(val, 'valvalvalvalv')
    if (bullruleFormrecharge.Salesscenario === '1') {
        if (paybasemsg_accountExpireTime.value) {
            var date1 = new Date(paybasemsg_accountExpireTime.value).getTime()
            var date2 = new Date().getTime()
            if (date1 > date2) {
                bullruleFormrecharge.date = new Date(
                    dayjs(paybasemsg_accountExpireTime.value.toString())
                        .add(val, 'day')
                        .toString()
                ).toLocaleString()
            } else {
                bullruleFormrecharge.date = new Date(
                    dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                        .add(val, 'day')
                        .toString()
                ).toLocaleString()
            }
        } else {
            bullruleFormrecharge.date = new Date(
                dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                    .add(val, 'day')
                    .toString()
            ).toLocaleString()
        }
        bullruleFormrecharge.xwdate = new Date(
            dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                .add(val, 'day')
                .toString()
        ).toLocaleString()
    }
    if (bullruleFormrecharge.Salesscenario === '2') {
        const mydate = new Date(
            dayjs().format('YYYY-MM-DD HH:mm:ss')
        ).getTime()
        payendtime.value = new Date(
            mydate + val * 24 * 60 * 60 * 1000
        ).toLocaleString()
        bullruleFormrecharge.xwdate = payendtime.value
    }
    if (bullruleFormrecharge.Salesscenario === '3') {
        if (paybasemsg_accountExpireTime.value) {
            var date1 = new Date(paybasemsg_accountExpireTime.value).getTime()
            var date2 = new Date().getTime()
            if (date1 > date2) {
                bullruleFormrecharge.date = new Date(
                    dayjs(paybasemsg_accountExpireTime.value.toString())
                        .add(val, 'day')
                        .toString()
                ).toLocaleString()
            } else {
                bullruleFormrecharge.date = new Date(
                    dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                        .add(val, 'day')
                        .toString()
                ).toLocaleString()
            }
        } else {
            bullruleFormrecharge.date = new Date(
                dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                    .add(val, 'day')
                    .toString()
            ).toLocaleString()
        }
        bullruleFormrecharge.xwdate = new Date(
            dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                .add(val, 'day')
                .toString()
        ).toLocaleString()
        const mydate = new Date(
            dayjs().format('YYYY-MM-DD HH:mm:ss')
        ).getTime()
        payendtime.value = new Date(
            mydate + val * 24 * 60 * 60 * 1000
        ).toLocaleString()
        bullruleFormrecharge.xwdate = payendtime.value
    }
}
const buymounth = (val: any) => {
    if (paybasemsg_accountExpireTime.value) {
        var date1 = new Date(paybasemsg_accountExpireTime.value).getTime()
        var date2 = new Date().getTime()
        if (date1 > date2) {
            bullruleFormrecharge.date = new Date(
                dayjs(paybasemsg_accountExpireTime.value.toString())
                    .add(val, 'month')
                    .toString()
            ).toLocaleString()
        } else {
            bullruleFormrecharge.date = new Date(
                dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                    .add(val, 'month')
                    .toString()
            ).toLocaleString()
        }
    } else {
        bullruleFormrecharge.date = new Date(
            dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                .add(val, 'month')
                .toString()
        ).toLocaleString()
    }
    bullruleFormrecharge.xwdate = new Date(
        dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
            .add(val, 'month')
            .toString()
    ).toLocaleString()
}
const payendtime = ref('')
// 子弹充值
const bulletpayrechargeapipay = () => {
    rechargebullresetForm(rechargebullruleFormRef.value)
    getditchskadmin()
    dialogbulletVisible.value = true
}
const form1 = reactive({
    companyAbbreviation: '',
    companyname: '',
    receiptaccount: '',
    coding: '',
    legalpersonname: '',
    openingbank: '',
    address: '',
    receiptId: '',
    bankName: '',
    channelId: null,
})
const bullruleFormrecharge = reactive<any>({
    Salesscenario: null,
    Purchasemonth: '',
    Amountofservice: 0,
    seatnum: 1,
    date: '',
    xwdate: '',
    paytype: '',
    accounttobecredited: '',
    sendfreetime: '',
    remark: '',
})
const dialogbulletVisible = ref(false)
const addinsureplanactivity = async () => {
    addinsureplanactivityapi({
        plansId: insurecompanyplanactiveid.value,
        type: 3,
        price: planactivitypricethree.value,
        priceFour: planactivitypricefour.value,
        activityStartTime: planactivitystarttime.value,
        activityEndTime: planactivityendtime.value,
        insurCompanyPlanCode: insurecompanyplanactivinsurCompanyPlanCode.value,
        insurCompanyPlanName: insurecompanyplanactiveplanname.value,
        insurCompanyName: insurecompanyplanactivecompanyname.value,
        insurCompany: insurecompanyplanactivinsurCompany.value,
        ensureLimitThree: insurecompanyplanactivensureLimitThree.value,
        ensureLimitFour: insurecompanyplanactivensureLimitFour.value,
        ensureLimitFive: insurecompanyplanactivensureLimitFive.value,
        isAllowedRepeat: insurecompanyplanactivisAllowedRepeat.value,
        isCompanyAllowedRepeat:
        insurecompanyplanactivisCompanyAllowedRepeat.value,
        allowedDetermineStatus:
        insurecompanyplanactivallowedDetermineStatus.value,
    }).then((res: any) => {
        console.log(res, '新增活动')
        if (res.code === 200) {
            getinsureplanactivitylist(insurecompanyplanactiveid.value)
            changeactivecancale()
            ElMessage({
                type: 'success',
                message: '添加成功',
            })
        }
    })
}
const changeinsureplanactivityfn = async () => {
    changeinsureplanactivityapi({
        id: planactivityid.value,
        plansId: insurecompanyplanactiveid.value,
        type: 3,
        price: planactivitypricethree.value,
        priceFour: planactivitypricefour.value,
        activityStartTime: planactivitystarttime.value,
        activityEndTime: planactivityendtime.value,
    }).then((res: any) => {
        if (res.code === 200) {
            getinsureplanactivitylist(insurecompanyplanactiveid.value)
            changeactivecancale()
            ElMessage({
                type: 'success',
                message: '修改成功',
            })
        }
    })
}
const planactivitypricefour = ref('')
const planactivitypricethree = ref('')
const planactivitystarttime = ref('')
const planactivityendtime = ref('')
const changeactivecancale = () => {
    planactivitypricefour.value = ''
    planactivitypricethree.value = ''
    planactivitystarttime.value = ''
    planactivityendtime.value = ''
    isaddinsureplanactiveflag.value = true
}
const changeactivesure = () => {
    if (isaddinsureplanactiveflag.value) {
        addinsureplanactivity()
    } else if (isaddinsureplanactiveflag.value === false) {
        ElMessageBox.confirm('确定修改吗?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        })
            .then(() => {
                changeinsureplanactivityfn()
            })
            .catch(() => {
                changeactivecancale()
                ElMessage({
                    type: 'info',
                    message: '取消修改',
                })
            })
    }
}
const planactivityid = ref(0)
const changeinsureplanactivity = (val: any) => {
    console.log(val)
    planactivityid.value = val.id
    planactivitypricefour.value = val.priceFour
    planactivitypricethree.value = val.price
    planactivitystarttime.value = val.activityStartTime
    planactivityendtime.value = val.activityEndTime
    isaddinsureplanactiveflag.value = false
}
const isaddinsureplanactiveflag = ref(true)
const getinsureplanactivitylist = async (id: any) => {
    const res: any = await getinsureplanactivitylistapi({
        plansId: id,
    })
    console.log(res, '活动列表')
    insureplanactivitylist.value = res.rows
    insureplanactivitytotal.value = res.total
}
const insureplanactivitylist = ref<any>([])
const insureplanactivitypagesize = ref<any>([])
const insureplanactivitypagenum = ref<any>([])
const insureplanactivitytotal = ref<any>([])
const changeinsureplanactivitypagesize = (val: any) => {
    insureplanactivitypagenum.value = 1
    insureplanactivitypagesize.value = val
    getinsureplanactivitylist(insurecompanyplanactiveid.value)
}
const changeinsureplanactivitypagenum = (val: any) => {
    insureplanactivitypagenum.value = val
    getinsureplanactivitylist(insurecompanyplanactiveid.value)
}
const insurecompanyplanactiveid = ref(0)
const insurecompanyplanactiveplanname = ref('')
const insurecompanyplanactivecompanyname = ref('')
const insurecompanyplanactivallowedDetermineStatus = ref(0)
const insurecompanyplanactivisCompanyAllowedRepeat = ref(0)
const insurecompanyplanactivisAllowedRepeat = ref(0)
const insurecompanyplanactivensureLimitFive = ref(0)
const insurecompanyplanactivensureLimitFour = ref(0)
const insurecompanyplanactivensureLimitThree = ref(0)
const insurecompanyplanactivinsurCompany = ref(0)
const insurecompanyplanactivinsurCompanyPlanCode = ref('')
const insureplanactivitytcopen = (val: any) => {
    isaddinsureplanactiveflag.value = true
    insurecompanyplanactivallowedDetermineStatus.value =
        val.allowedDetermineStatus
    insurecompanyplanactivisCompanyAllowedRepeat.value =
        val.isCompanyAllowedRepeat
    insurecompanyplanactivisAllowedRepeat.value = val.isAllowedRepeat
    insurecompanyplanactivensureLimitFive.value = val.ensureLimitFive
    insurecompanyplanactivensureLimitFour.value = val.ensureLimitFour
    insurecompanyplanactivensureLimitThree.value = val.ensureLimitThree
    insurecompanyplanactivinsurCompany.value = val.insurCompany
    insurecompanyplanactivinsurCompanyPlanCode.value = val.insurCompanyPlanCode
    insurecompanyplanactiveid.value = val.id
    insurecompanyplanactiveplanname.value = val.insurCompanyPlanName
    insurecompanyplanactivecompanyname.value = val.companyName
    getinsureplanactivitylist(val.id)
    insureplanactivitytc.value = true
}
const insureplanactivitytc = ref(false)
const delinsurecompanyplanfn = (id: any) => {
    ElMessageBox.confirm('确定删除此保险方案吗？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            delinsurecomapnyplan(id)
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消删除',
            })
        })
}
const delinsurecomapnyplan = (id: any) => {
    delinsurecomapnyplanapi(id).then((res: any) => {
        console.log(res)
        if (res.code === 200) {
            getcompanyinsuretype()
            ElMessage({
                type: 'success',
                message: '删除成功',
            })
        }
    })
}
const changecompanyinsureplancancel = () => {
    changecompanyinsureplan_companyName.value = ''
    changecompanyinsureplan_insurCompanyPlanName.value = ''
    changecompanyinsureplan_price.value = ''
    changecompanyinsureplan_priceFive.value = ''
    changecompanyinsureplan_priceFour.value = ''
    changecompanyinsureplan_ensureLimitThree.value = ''
    changecompanyinsureplan_ensureLimitFour.value = ''
    changecompanyinsureplan_ensureLimitFive.value = ''
    changecompanyinsureplan_ensureLimit.value = ''
    changecompanyinsureplan_insureBase.value = ''
    changecompanyinsureplan_beginTime.value = ''
    changecompanyinsureplan_endTime.value = ''
    changecompanyinsureplan_hasEnsure.value = null
    changecompanyinsureplan_isAllowedRepeat.value = ''
    changecompanyinsureplan_isCompanyAllowedRepeat.value = ''
    changecompanyinsureplan_allowedDetermineStatus.value = ''
    // changecompanyinsureplaninfomsg = null
    changecompanyinsureplantc.value = false
}
const changeinsureplan = async () => {
    const res: any = await changeinsureplanapi({
        id: companyinsureplanid.value,
        companyName: changecompanyinsureplan_companyName.value,
        insurCompanyPlanName:
        changecompanyinsureplan_insurCompanyPlanName.value,
        price: changecompanyinsureplan_price.value * 1,
        priceFive: changecompanyinsureplan_priceFive.value * 1,
        priceFour: changecompanyinsureplan_priceFour.value * 1,
        ensureLimitThree: changecompanyinsureplan_ensureLimitThree.value,
        ensureLimitFour: changecompanyinsureplan_ensureLimitFour.value,
        ensureLimitFive: changecompanyinsureplan_ensureLimitFive.value,
        ensureLimit: changecompanyinsureplan_ensureLimit.value,
        insureBase: changecompanyinsureplan_insureBase.value,
        beginTime: changecompanyinsureplan_beginTime.value,
        endTime: changecompanyinsureplan_endTime.value,
        hasEnsure: changecompanyinsureplan_hasEnsure.value,
        isAllowedRepeat: changecompanyinsureplan_isAllowedRepeat.value,
        isCompanyAllowedRepeat:
        changecompanyinsureplan_isCompanyAllowedRepeat.value,
        allowedDetermineStatus:
        changecompanyinsureplan_allowedDetermineStatus.value,
        exceedConfig: Object.keys(exceedConfig.value).length
            ? JSON.stringify(exceedConfig.value)
            : null,
    })
    console.log(res, '修改方案')
    if (res.code === 200) {
        changecompanyinsureplantc.value = false
        getcompanyinsuretype()
        ElMessage({
            message: '操作成功',
            type: 'success',
        })
    }
}
const changecompanyinsureplansure = () => {
    changeinsureplan()
}
const showzdtbrs = ref(true)
// const changecompanyinsureplaninfomsg = reactive(null)
const exceedConfig = ref({}) as any

const exceedPropName = (name: string) => {
    console.log(121, name.replace(/\D/g, ''))
    return name.replace(/\D/g, '')
}

const getinsureplanmsg = async (id: any) => {
    const res: any = await getinsureplanmsgapi(id)
    console.log(res, '获取方案信息')
    if (res.insurCompany === 'period_006_gyas') {
        showzdtbrs.value = false
    } else {
        showzdtbrs.value = true
    }
    // showzdtbrs.value = res.insurCompany !== 'period_006_gyas'
    // changecompanyinsureplaninfomsg = res
    changecompanyinsureplan_companyName.value = res.companyName
    changecompanyinsureplan_insurCompanyPlanName.value =
        res.insurCompanyPlanName
    changecompanyinsureplan_price.value = res.price
    changecompanyinsureplan_priceFive.value = res.priceFive
    changecompanyinsureplan_priceFour.value = res.priceFour
    changecompanyinsureplan_ensureLimitThree.value = res.ensureLimitThree
    changecompanyinsureplan_ensureLimitFour.value = res.ensureLimitFour
    changecompanyinsureplan_ensureLimitFive.value = res.ensureLimitFive
    changecompanyinsureplan_ensureLimit.value = res.ensureLimit
    changecompanyinsureplan_insureBase.value = res.insureBase
    changecompanyinsureplan_beginTime.value = res.beginTime
    changecompanyinsureplan_endTime.value = res.endTime
    changecompanyinsureplan_hasEnsure.value = res.hasEnsure
    changecompanyinsureplan_isAllowedRepeat.value = res.isAllowedRepeat
    changecompanyinsureplan_isCompanyAllowedRepeat.value =
        res.isCompanyAllowedRepeat
    changecompanyinsureplan_allowedDetermineStatus.value =
        res.allowedDetermineStatus

    exceedConfig.value = res.exceedConfig ? JSON.parse(res.exceedConfig) : {}

    if (Object.keys(exceedConfig.value).length) {
        console.log(111222, exceedConfig.value)
    }
}
const changecompanyinsureplan_companyName = ref('')
const changecompanyinsureplan_insurCompanyPlanName = ref('')
const changecompanyinsureplan_price = ref<any>('')
const changecompanyinsureplan_priceFive = ref<any>('')
const changecompanyinsureplan_priceFour = ref<any>('')
const changecompanyinsureplan_ensureLimitThree = ref('')
const changecompanyinsureplan_ensureLimitFour = ref('')
const changecompanyinsureplan_ensureLimitFive = ref('')
const changecompanyinsureplan_ensureLimit = ref('')
const changecompanyinsureplan_insureBase = ref('')
const changecompanyinsureplan_beginTime = ref('')
const changecompanyinsureplan_endTime = ref('')
const changecompanyinsureplan_hasEnsure = ref<any>(false)
const changecompanyinsureplan_isAllowedRepeat = ref('')
const changecompanyinsureplan_isCompanyAllowedRepeat = ref('')
const changecompanyinsureplan_allowedDetermineStatus = ref('')
const operateRecordId = ref(0)
const checkinsureguaranteeslipdetailtcopen = (val: any) => {
    operateRecordId.value = val.id
    checkinsureguaranteeslipdetapi({
        pageNum: 1,
        pageSize: 10,
        operateRecordId: operateRecordId.value,
    }).then((res: any) => {
        if (res.rows.length === 0) {
            ElMessage({
                message: '暂无数据',
                type: 'warning',
            })
            return
        } else {
            checkinsureguaranteeslipdetailtc.value = true
            checkinsureguaranteeslipdetlist.value = res.rows
            checkinsuredetailpqdw.value = res.rows[0].serveCompanyName
            checkinsuredetailfamc.value = res.rows[0].companyPlanName
            checkinsuredetailfabm.value = res.rows[0].code
            checkinsuredetailfxlx.value = res.rows[0].occupationLevel + '类'
            checkinsuredetailtbrq.value = res.rows[0].createTime
            checkinsuredetailsxrq.value = res.rows[0].insurStartTime
            checkinsuredetailgz.value = res.rows[0].occupationName
            checkinsureguaranteeslipdetltotal.value = res.total
        }
    })
}
const checkinsureguaranteeslipdetailtc = ref(false)
const getcheckinsureguaranteeslipdetlist = async () => {
    const res: any = await checkinsureguaranteeslipdetapi({
        pageNum: 1,
        pageSize: 10,
        operateRecordId: operateRecordId.value,
    })
    console.log(res, '查看保单详情')
    checkinsureguaranteeslipdetlist.value = res.rows
    checkinsuredetailpqdw.value = res.rows[0].serveCompanyName
    checkinsuredetailfamc.value = res.rows[0].companyPlanName
    checkinsuredetailfabm.value = res.rows[0].code
    checkinsuredetailfxlx.value = res.rows[0].occupationLevel + '类'
    checkinsuredetailtbrq.value = res.rows[0].createTime
    checkinsuredetailsxrq.value = res.rows[0].insurStartTime
    checkinsuredetailgz.value = res.rows[0].occupationName
    checkinsureguaranteeslipdetltotal.value = res.total
}
const checkinsuredetailpqdw = ref('')
const checkinsuredetailfamc = ref('')
const checkinsuredetailfabm = ref('')
const checkinsuredetailfxlx = ref('')
const checkinsuredetailtbrq = ref('')
const checkinsuredetailsxrq = ref('')
const checkinsuredetailgz = ref('')
const checkinsureguaranteeslipdetlist = ref<any>([])
const checkinsureguaranteeslipdetlpageSize = ref(10)
const checkinsureguaranteeslipdetlpageNum = ref(1)
const checkinsureguaranteeslipdetltotal = ref(10)
const changecheckinsureguaranteeslipdetlpageNum = (val: any) => {
    checkinsureguaranteeslipdetlpageNum.value = val
    getcheckinsureguaranteeslipdetlist()
}
const changecheckinsureguaranteeslipdetlpageSize = (val: any) => {
    checkinsureguaranteeslipdetlpageNum.value = 1
    checkinsureguaranteeslipdetlpageSize.value = val
    getcheckinsureguaranteeslipdetlist()
}
const addlonginsurehistorypageSize = ref(20)
const addlonginsurehistorypageNum = ref(1)
const addlonginsurehistorytotal = ref(10)
const addlonginsurehistorydate = ref<any>([])
const changeaddlonginsurehistorypageNum = (val: any) => {
    addlonginsurehistorypageNum.value = val
    getaddlonginsurehistorylist()
}
const changeaddlonginsurehistorypageSize = (val: any) => {
    addlonginsurehistorypageNum.value = 1
    addlonginsurehistorypageSize.value = val
    getaddlonginsurehistorylist()
}
const addlonginsurehistorytcopen = () => {
    addlonginsurehistorytc.value = true
    getaddlonginsurehistorylist()
}
const addlonginsurehistorytc = ref(false)
const getaddlonginsurehistorylist = async () => {
    const res: any = await addlonginsurehistorylistapi({
        companyId: companyId.value,
        pageNum: addlonginsurehistorypageNum.value,
        pageSize: addlonginsurehistorypageSize.value,
        beginInsureDay:
            addlonginsurehistorydate.value.length === 0
                ? ''
                : GetDate(new Date(addlonginsurehistorydate.value[0])),
        endInsureDay:
            addlonginsurehistorydate.value.length === 0
                ? ''
                : GetDate(new Date(addlonginsurehistorydate.value[1])),
    })
    console.log(res, '获取加减保记录')
    addlonginsurehistorylist.value = res.rows
    addlonginsurehistorytotal.value = res.total
}
const addlonginsurehistorylist = ref<any>([])
const companyinsureplanid = ref(0)
const changecompanyinsureplantcopen = (id: any) => {
    companyinsureplanid.value = id
    getinsureplanmsg(id)
    changecompanyinsureplantc.value = true
}
const changecompanyinsureplanhistorytcopen = (val: any) => {
    console.log(val.insurComCompanyPlansRecords)
    changecompanyinsureplanhistorylist.value = val.insurComCompanyPlansRecords
    changecompanyinsureplanhistorytc.value = true
}
const changecompanyinsureplanhistorylist = ref<any>([])
const changecompanyinsureplantc = ref(false)
const changecompanyinsureplanhistorytc = ref(false)
const insuretypeendtime = ref('')
const insuretypestarttime = ref('')
const changeinsuretypepageNum = (val: any) => {
    console.log(val)
    insuretypepageNum.value = val
    getcompanyinsuretype()
}
const changeinsuretypepageSize = (val: any) => {
    console.log(val)
    insuretypepageNum.value = 1
    insuretypepageSize.value = val
    getcompanyinsuretype()
}
const insuretypelist = ref<any>([])
const lookinsuretypetcopen = () => {
    insuretypetc.value = true
    getcompanyinsuretype()
}
const getcompanyinsuretype = async () => {
    const res: any = await getcompanyinsuretypeapi({
        pageNum: insuretypepageNum.value,
        pageSize: insuretypepageSize.value,
        companyId: companyId.value,
        isAllowedRepeat: insuretypeisAllowedRepeat.value ? insuretypeisAllowedRepeat.value : '',
        isCompanyAllowedRepeat: insuretypeisCompanyAllowedRepeat.value ? insuretypeisCompanyAllowedRepeat.value : '',
        allowedDetermineStatus: insuretypeallowedDetermineStatus.value ? insuretypeallowedDetermineStatus.value : '',
        isEnd: insuretypeauditStatus.value ? insuretypeauditStatus.value : '',
        searchBeginTime: insuretypestarttime.value ? insuretypestarttime.value : '',
        searchEndTime: insuretypeendtime.value ? insuretypeendtime.value : '',
    })
    console.log(res, '获取公司保险方案列表')
    insuretypelist.value = res.list
    insuretypetotal.value = res.totalCount
}
const insuretypetotal = ref(0)
const insuretypepageNum = ref(1)
const insuretypepageSize = ref(10)
const insuretypeisAllowedRepeat = ref('')
const insuretypeisCompanyAllowedRepeat = ref('')
const insuretypeallowedDetermineStatus = ref('')
const insuretypeauditStatus = ref('')

const yjxbsure = () => {
    ElMessageBox.confirm('确定一键续保吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            onceaddinsure()
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消续保',
            })
        })
}
const insuretypetc = ref(false)
const changeyjxbtab = (ele: any, i: any) => {
    yjxbautotime.value = ele.createTime
    showedyjxbtablemsg.value = ele.staffRecordList
    yjxbtabflag.value = i
    console.log(ele)
}
const yjxbtabflag = ref(0)
const longinsuresetoveragenum = async () => {
    const res: any = await longinsuresetoveragenumapi({
        companyId: companyId.value,
        allowOverageEnsure: allowoveragenum.value,
    })
    console.log(res, '设置超龄人数')
    if (res.code === 200) {
        getlongbasemsg()
        overagetc.value = false
        ElMessage({
            message: '修改成功',
            type: 'success',
        })
    }
}
const setoveragenumcancel = () => {
    allowoveragenum.value = longbasemsg_allowOverageEnsure.value
    overagetc.value = false
}
const setoveragenumsure = () => {
    longinsuresetoveragenum()
}
const closeaddinsuretc = () => {
    onceaddinsuretc.value = false
}
const closeinsuretypetc = () => {
    insuretypetc.value = false
}
const lookonceaddinsurelist = async () => {
    const res: any = await lookonceaddinsurelistapi(companyId.value)
    console.log(res, '查看一键续保人员列表')
    yjxbcompanyName.value = res.companyName
    yjxbtablemsg.value = res.terminalEnsurePlanList
    showedyjxbtablemsg.value = yjxbtablemsg.value[0].staffRecordList
    yjxbautotime.value = yjxbtablemsg.value[0].createTime
}
const yjxbcompanyName = ref('')
const yjxbautotime = ref('')
const yjxbtablemsg = ref<any>([])
const showedyjxbtablemsg = ref([])
const onceaddinsuretc = ref(false)
const onceaddinsuretcopen = () => {
    onceaddinsuretc.value = true
    lookonceaddinsurelist()
}
const falidescription = ref('')
const onceaddinsure = async () => {
    const res: any = await onceaddinsureapi({companyId: companyId.value})
    console.log(res, '一键续保')
    onceaddinsuretc.value = false
    if (res) {
        centerDialogVisible.value = true
        if (res.oneKeyEnsureSucc) {
            (falidescription.value =
                res.msg +
                '，投保生效日期：' +
                res.onekeyEnsureStartDate +
                '，一键续保人员数量：' +
                res.onekeyEnsureWorkerNum),
                '投保成功'
        } else if (
            typeof res.oneKeyEnsureSucc === 'boolean' &&
            !res.oneKeyEnsureSucc
        ) {
            if (
                typeof res.isEnoughBalance === 'boolean' &&
                !res.isEnoughBalance
            ) {
                (falidescription.value =
                    '续保金额不足，当前余额：' +
                    res.currentBalance +
                    '，明日预扣费：' +
                    res.tomorrowNeedCostFee +
                    '，当前余额不足以支持续保的明日扣费'),
                    '投保失败'
            } else {
                (falidescription.value = res.msg), '投保失败'
            }
        }
    } else {
        ElMessage({
            type: 'warning',
            message: res.msg,
        })
    }
}
const reducelonginsure = async () => {
    const res: any = await reducelonginsureapi({
        companyId: companyId.value,
        companyPlanId: reducecompanyPlanId.value,
        ids: [reduceinsureid.value],
        insurEndDay: longinsuresettimeform.date,
    })
    console.log(res, '减保操作')
    if (res.code === 200) {
        longinsurejbtime.value = false
        getlongoveragelist()
        ElMessage({
            type: 'success',
            message: '操作成功',
        })
    }
}
const reducecompanyPlanId = ref(0)
const reduceinsureid = ref(0)
const change = (val: any) => {
    console.log(val)
}
const longinsuresettimerules = reactive<any>({
    date: [
        {
            type: 'date',
            required: true,
            message: '请选择时间',
            trigger: 'change',
        },
    ],
})
const longinsuresettimeRef = ref<FormInstance>()
const submitlonginsurejbtime = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
            console.log('submit!')
            reducelonginsure()
        } else {
            console.log('error submit!', fields)
        }
    })
}

const resetlonginsurejbtime = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
    longinsurejbtime.value = false
}
const longinsuresettimeform = reactive({
    date: '',
})
const reducetime = ref('')
const longinsurejbtime = ref(false)
const longinsurejb = (val: any) => {
    console.log(val)
    reducetime.value = val.insurStartTime
    reduceinsureid.value = val.id
    reducecompanyPlanId.value = val.companyPlanId
    longinsurejbtime.value = true
}
const getlonginsuremsg = async () => {
    const res: any = await getlonginsuremsgapi(companyId.value)
    console.log(res, '查看保险信息(方案,加减保次数,减保人数)')
    long_addInsur.value = res.addInsur
    long_automaticReduceInsur.value = res.automaticReduceInsur
    long_expirePlanCount.value = res.expirePlanCount
    long_reduceInsur.value = res.reduceInsur
    long_revoke.value = res.revoke
    long_unexpiredPlanCount.value = res.unexpiredPlanCount
}
const long_addInsur = ref(null)
const long_automaticReduceInsur = ref(null)
const long_expirePlanCount = ref(null)
const long_reduceInsur = ref(null)
const long_revoke = ref(null)
const long_unexpiredPlanCount = ref(null)
const getlongoveragelist = async () => {
    const res: any = await getlongoveragelistapi(companyId.value)
    console.log(res, '获取公司超过65岁投保记录')
    longoveragelist.value = res
}
const longoveragelist = ref<any>([])
const allowoveragenum = ref('0')
const overagetc = ref(false)
const overage = () => {
    allowoveragenum.value = longbasemsg_allowOverageEnsure.value
    overagetc.value = true
    getlongoveragelist()
}
const setadmincancel = () => {
    adminsettc.value = false
    blacklist.value =
        longbasemsg_refusalGuaranteeStatus.value === 1 ? true : false
}
const setadminsure = () => {
    longsetadminapi({
        userType: 2,
        companyId: companyId.value,
        refusalGuaranteeStatus: blacklist.value === true ? 1 : 0,
    }).then((res: any) => {
        console.log(res, '长期保账户设置')
        if (res.code === 200) {
            setadmincancel()
            getlongbasemsg()
            ElMessage({
                type: 'success',
                message: res.msg,
            })
        }
    })
}
const setadmin = () => {
    blacklist.value =
        longbasemsg_refusalGuaranteeStatus.value === 1 ? true : false
    adminsettc.value = true
}
const adminsettc = ref(false)
const dtb = ref(false)
const blacklist = ref(false)
const sureopenbullet = () => {
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    ElMessageBox.confirm('确定开通吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            if (!bulletform.paySaleid) {
                ElMessage({
                    message: '请选择销售',
                    type: 'warning',
                })
                return
            }
            if (!bulletform.payditch) {
                ElMessage({
                    message: '请选择收款渠道',
                    type: 'warning',
                })
                return
            }
            if (!bulletform.payadmin) {
                ElMessage({
                    message: '请选择收款账号',
                    type: 'warning',
                })
                return
            }
            if (!bulletform.payKtzh) {
                ElMessage({
                    message: '请选择开通账户',
                    type: 'warning',
                })
                return
            }
            if (paybasemsg_isOpenAlipay.value === 0 && bulletform.payKtzh.includes('2')) {
                alipayAccountApi({companyId: companyId.value}).then(() => {
                    changeclientdetailmsgapi({
                        id: companyId.value,
                        auditStatus: basemsg.auditStatus,
                        companyAbbreviation: bulletform.gsjc,
                        receiptId: bulletform.payadmin,
                        creditCode: bulletform.yyzzbm,
                        legalPerson: bulletform.frxm,
                        merchantBankCard: bulletform.khhjhh,
                        area: bulletform.address,
                        channelId: bulletform.payditch,
                        isOpenWechatPay: bulletform.payKtzh.includes('1') ? 1 : 0,
                        isOpenSalaryCard: bulletform.payKtzh.includes('1') ? 1 : 0,
                        companyName: companyName.value,
                        subMchid: bulletform.shh,
                        businessLicenseAddress: bulletform.yyzzaddress,
                        dailyQuota: bulletform.dred,
                        personSingleQuota: bulletform.drkled,
                        productType: 0,
                        isOpenAlipay: bulletform.payKtzh.includes('2') ? 1 : 0,
                    }).then((res: any) => {
                        console.log(res)
                        if (res.code === 200) {
                            setmarketapi({
                                companyId: companyId.value,
                                id: paybasemsg_dealId.value,
                                productType: 0,
                                saleId: bulletform.paySaleid,
                                serviceStartTime: `${y}-${m}-01`,
                                serviceState: 0,
                            }).then((res: any) => {
                                if (res.code == 200) {
                                    getclientsdetail()
                                    getbulletpayrollmsgapi(companyId.value).then(
                                        (res: any) => {
                                            payBasicInfo.value = res
                                            paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                            alipayRegisterStatus.value = res.alipayRegisterStatus
                                            paybasemsg_accountExpireTime.value =
                                                res.accountExpireTime
                                            paybasemsg_saleId.value = res.saleId
                                            paybasemsg_dealId.value = res.dealId
                                            paybasemsg_payProductOpenTime.value =
                                                res.payProductOpenTime
                                            paybasemsg_isOpenPaySalary.value =
                                                res.isOpenPaySalary
                                            paybasemsg_phone.value = res.phone
                                            paybasemsg_superParentName.value =
                                                res.superParentName
                                            paybasemsg_validTime.value = res.validTime
                                            paybasemsg_patMoneyCount.value =
                                                res.patMoneyCount
                                            paybasemsg_payAccountBalance.value =
                                                res.payAccountBalance
                                            paybasemsg_saleName.value = res.saleName
                                        }
                                    )
                                    // router.go(0)
                                    ElMessage({
                                        type: 'success',
                                        message: '开通成功',
                                    })
                                }
                            })
                        }
                    })
                })
            }
            changeclientdetailmsgapi({
                id: companyId.value,
                auditStatus: basemsg.auditStatus,
                companyAbbreviation: bulletform.gsjc,
                receiptId: bulletform.payadmin,
                creditCode: bulletform.yyzzbm,
                legalPerson: bulletform.frxm,
                merchantBankCard: bulletform.khhjhh,
                area: bulletform.address,
                channelId: bulletform.payditch,
                isOpenPaySalary: bulletform.payKtzh.includes('1') ? 1 : 0,
                isOpenSalaryCard: bulletform.payKtzh.includes('1') ? 1 : 0,
                companyName: companyName.value,
                subMchid: bulletform.shh,
                businessLicenseAddress: bulletform.yyzzaddress,
                dailyQuota: bulletform.dred,
                personSingleQuota: bulletform.drkled,
                productType: 0,
                isOpenAlipay: bulletform.payKtzh.includes('2') ? 1 : 0,
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    setmarketapi({
                        companyId: companyId.value,
                        id: paybasemsg_dealId.value,
                        productType: 0,
                        saleId: bulletform.paySaleid,
                        serviceStartTime: `${y}-${m}-01`,
                        serviceState: 0,
                    }).then((res: any) => {
                        if (res.code == 200) {
                            getclientsdetail()
                            getbulletpayrollmsgapi(companyId.value).then(
                                (res: any) => {
                                    payBasicInfo.value = res
                                    paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                    alipayRegisterStatus.value = res.alipayRegisterStatus
                                    paybasemsg_accountExpireTime.value =
                                        res.accountExpireTime
                                    paybasemsg_saleId.value = res.saleId
                                    paybasemsg_dealId.value = res.dealId
                                    paybasemsg_payProductOpenTime.value =
                                        res.payProductOpenTime
                                    paybasemsg_isOpenPaySalary.value =
                                        res.isOpenPaySalary
                                    paybasemsg_phone.value = res.phone
                                    paybasemsg_superParentName.value =
                                        res.superParentName
                                    paybasemsg_validTime.value = res.validTime
                                    paybasemsg_patMoneyCount.value =
                                        res.patMoneyCount
                                    paybasemsg_payAccountBalance.value =
                                        res.payAccountBalance
                                    paybasemsg_saleName.value = res.saleName
                                }
                            )
                            // router.go(0)
                            ElMessage({
                                type: 'success',
                                message: '开通成功',
                            })
                        }
                    })
                }
            })
        })
        .catch(() => {
            getclientsdetail()
            getbulletpayrollmsgapi(companyId.value).then((res: any) => {
                payBasicInfo.value = res
                paybasemsg_accountExpireTime.value = res.accountExpireTime
                paybasemsg_saleId.value = res.saleId
                paybasemsg_dealId.value = res.dealId
                paybasemsg_payProductOpenTime.value = res.payProductOpenTime
                paybasemsg_isOpenPaySalary.value = res.isOpenPaySalary
                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                alipayRegisterStatus.value = res.alipayRegisterStatus
                paybasemsg_phone.value = res.phone
                paybasemsg_superParentName.value = res.superParentName
                paybasemsg_validTime.value = res.validTime
                paybasemsg_patMoneyCount.value = res.patMoneyCount
                paybasemsg_payAccountBalance.value = res.payAccountBalance
                paybasemsg_saleName.value = res.saleName
            })
            ElMessage({
                type: 'info',
                message: '取消开通',
            })
        })
}
const surechangebull = () => {
    if (bulletform.payadmin === null) {
        ElMessage({
            type: 'warning',
            message: '请选择收款账户',
        })
        return
    }
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    ElMessageBox.confirm('确定修改吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            if (!bulletform.paySaleid) {
                ElMessage({
                    message: '请选择销售',
                    type: 'warning',
                })
                return
            }
            if (!bulletform.payditch) {
                ElMessage({
                    message: '请选择收款渠道',
                    type: 'warning',
                })
                return
            }
            if (!bulletform.payadmin) {
                ElMessage({
                    message: '请选择收款账号',
                    type: 'warning',
                })
                return
            }
            if (!bulletform.payKtzh) {
                ElMessage({
                    message: '请选择开通账户',
                    type: 'warning',
                })
                return
            }
            if (paybasemsg_isOpenAlipay.value === 0 && bulletform.payKtzh.includes('2')) {
                alipayAccountApi({companyId: companyId.value}).then((res) => {
                    changeclientdetailmsgapi({
                        id: companyId.value,
                        auditStatus: basemsg.auditStatus,
                        companyAbbreviation: bulletform.gsjc,
                        receiptId: bulletform.payadmin,
                        subMchid: bulletform.shh,
                        merchantBankCard: bulletform.khhjhh,
                        creditCode: bulletform.yyzzbm,
                        legalPerson: bulletform.frxm,
                        area: bulletform.address,
                        channelId: bulletform.payditch,
                        companyName: companyName.value,
                        businessLicenseAddress: bulletform.yyzzaddress,
                        productType: 0,
                        dailyQuota: bulletform.dred,
                        personSingleQuota: bulletform.drkled,
                        isOpenWechatPay: bulletform.payKtzh.includes('1') ? 1 : 0,
                        isOpenAlipay: bulletform.payKtzh.includes('2') ? 1 : 0,

                    }).then((res: any) => {
                        if (res.code === 200) {
                            if (paybasemsg_saleId.value === null) {
                                setmarketapi({
                                    companyId: companyId.value,
                                    id: paybasemsg_dealId.value,
                                    productType: 0,
                                    saleId: bulletform.paySaleid,
                                    serviceStartTime: `${y}-${m}-01`,
                                    serviceState: 0,
                                }).then((res: any) => {
                                    if (res.code == 200) {
                                        getclientsdetail()
                                        getbulletpayrollmsgapi(companyId.value).then(
                                            (res: any) => {
                                                payBasicInfo.value = res
                                                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                                alipayRegisterStatus.value = res.alipayRegisterStatus
                                                paybasemsg_accountExpireTime.value =
                                                    res.accountExpireTime
                                                paybasemsg_saleId.value = res.saleId
                                                paybasemsg_dealId.value = res.dealId
                                                paybasemsg_payProductOpenTime.value =
                                                    res.payProductOpenTime
                                                paybasemsg_isOpenPaySalary.value =
                                                    res.isOpenPaySalary
                                                paybasemsg_phone.value = res.phone
                                                paybasemsg_superParentName.value =
                                                    res.superParentName
                                                paybasemsg_validTime.value =
                                                    res.validTime
                                                paybasemsg_patMoneyCount.value =
                                                    res.patMoneyCount
                                                paybasemsg_payAccountBalance.value =
                                                    res.payAccountBalance
                                                paybasemsg_saleName.value =
                                                    res.saleName
                                            }
                                        )
                                        ElMessage({
                                            type: 'success',
                                            message: '修改成功',
                                        })
                                    }
                                })
                            } else {
                                changemarketapi({
                                    companyId: companyId.value,
                                    id: paybasemsg_dealId.value,
                                    productType: 0,
                                    saleId: bulletform.paySaleid,
                                    saleOldId: paybasemsg_saleId.value,
                                    serviceStartTime: `${y}-${m}-01`,
                                    serviceState: 0,
                                }).then((res: any) => {
                                    if (res.code == 200) {
                                        getclientsdetail()
                                        getbulletpayrollmsgapi(companyId.value).then(
                                            (res: any) => {
                                                payBasicInfo.value = res
                                                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                                alipayRegisterStatus.value = res.alipayRegisterStatus
                                                paybasemsg_accountExpireTime.value =
                                                    res.accountExpireTime
                                                paybasemsg_saleId.value = res.saleId
                                                paybasemsg_dealId.value = res.dealId
                                                paybasemsg_payProductOpenTime.value =
                                                    res.payProductOpenTime
                                                paybasemsg_isOpenPaySalary.value =
                                                    res.isOpenPaySalary
                                                paybasemsg_phone.value = res.phone
                                                paybasemsg_superParentName.value =
                                                    res.superParentName
                                                paybasemsg_validTime.value =
                                                    res.validTime
                                                paybasemsg_patMoneyCount.value =
                                                    res.patMoneyCount
                                                paybasemsg_payAccountBalance.value =
                                                    res.payAccountBalance
                                                paybasemsg_saleName.value =
                                                    res.saleName
                                            }
                                        )
                                        ElMessage({
                                            type: 'success',
                                            message: '修改成功',
                                        })
                                    }
                                })
                            }
                        }
                    })
                })
            }
            changeclientdetailmsgapi({
                id: companyId.value,
                auditStatus: basemsg.auditStatus,
                companyAbbreviation: bulletform.gsjc,
                receiptId: bulletform.payadmin,
                creditCode: bulletform.yyzzbm,
                subMchid: bulletform.shh,
                legalPerson: bulletform.frxm,
                merchantBankCard: bulletform.khhjhh,
                area: bulletform.address,
                channelId: bulletform.payditch,
                companyName: companyName.value,
                businessLicenseAddress: bulletform.yyzzaddress,
                productType: 0,
                dailyQuota: bulletform.dred,
                personSingleQuota: bulletform.drkled,
                isOpenPaySalary: bulletform.payKtzh.includes('1') ? 1 : 0,
                isOpenAlipay: bulletform.payKtzh.includes('2') ? 1 : 0,

            }).then((res: any) => {
                if (res.code === 200) {
                    if (paybasemsg_saleId.value === null) {
                        setmarketapi({
                            companyId: companyId.value,
                            id: paybasemsg_dealId.value,
                            productType: 0,
                            saleId: bulletform.paySaleid,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code == 200) {
                                getclientsdetail()
                                getbulletpayrollmsgapi(companyId.value).then(
                                    (res: any) => {
                                        payBasicInfo.value = res
                                        paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                        alipayRegisterStatus.value = res.alipayRegisterStatus
                                        paybasemsg_accountExpireTime.value =
                                            res.accountExpireTime
                                        paybasemsg_saleId.value = res.saleId
                                        paybasemsg_dealId.value = res.dealId
                                        paybasemsg_payProductOpenTime.value =
                                            res.payProductOpenTime
                                        paybasemsg_isOpenPaySalary.value =
                                            res.isOpenPaySalary
                                        paybasemsg_phone.value = res.phone
                                        paybasemsg_superParentName.value =
                                            res.superParentName
                                        paybasemsg_validTime.value =
                                            res.validTime
                                        paybasemsg_patMoneyCount.value =
                                            res.patMoneyCount
                                        paybasemsg_payAccountBalance.value =
                                            res.payAccountBalance
                                        paybasemsg_saleName.value =
                                            res.saleName
                                    }
                                )
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                            }
                        })
                    } else {
                        changemarketapi({
                            companyId: companyId.value,
                            id: paybasemsg_dealId.value,
                            productType: 0,
                            saleId: bulletform.paySaleid,
                            saleOldId: paybasemsg_saleId.value,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code == 200) {
                                getclientsdetail()
                                getbulletpayrollmsgapi(companyId.value).then(
                                    (res: any) => {
                                        payBasicInfo.value = res
                                        paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                                        alipayRegisterStatus.value = res.alipayRegisterStatus
                                        paybasemsg_accountExpireTime.value =
                                            res.accountExpireTime
                                        paybasemsg_saleId.value = res.saleId
                                        paybasemsg_dealId.value = res.dealId
                                        paybasemsg_payProductOpenTime.value =
                                            res.payProductOpenTime
                                        paybasemsg_isOpenPaySalary.value =
                                            res.isOpenPaySalary
                                        paybasemsg_phone.value = res.phone
                                        paybasemsg_superParentName.value =
                                            res.superParentName
                                        paybasemsg_validTime.value =
                                            res.validTime
                                        paybasemsg_patMoneyCount.value =
                                            res.patMoneyCount
                                        paybasemsg_payAccountBalance.value =
                                            res.payAccountBalance
                                        paybasemsg_saleName.value =
                                            res.saleName
                                    }
                                )
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                            }
                        })
                    }
                }
            })
        })
        .catch(() => {
            getclientsdetail()
            getbulletpayrollmsgapi(companyId.value).then((res: any) => {
                payBasicInfo.value = res
                paybasemsg_accountExpireTime.value = res.accountExpireTime
                paybasemsg_saleId.value = res.saleId
                paybasemsg_dealId.value = res.dealId
                paybasemsg_payProductOpenTime.value = res.payProductOpenTime
                paybasemsg_isOpenPaySalary.value = res.isOpenPaySalary
                paybasemsg_isOpenAlipay.value = res.isOpenAlipay
                alipayRegisterStatus.value = res.alipayRegisterStatus
                paybasemsg_phone.value = res.phone
                paybasemsg_superParentName.value = res.superParentName
                paybasemsg_validTime.value = res.validTime
                paybasemsg_patMoneyCount.value = res.patMoneyCount
                paybasemsg_payAccountBalance.value = res.payAccountBalance
                paybasemsg_saleName.value = res.saleName
            })
            ElMessage({
                type: 'info',
                message: '取消修改',
            })
        })
}

const uploadImageRef = ref()
const suresetlong = () => {
    console.log(1111, longform)
    if (!longform.paySaleid) {
        ElMessage({
            type: 'warning',
            message: '请选择销售',
        })
        return
    }
    if (!longform.industry) {
        ElMessage({
            type: 'warning',
            message: '请选择销售',
        })
        return
    }
    if (longform.bxcompany.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择保险公司',
        })
        return
    }
    if (longform.bxtype.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择投保方案',
        })
        return
    }
    if (!longform.payditch) {
        ElMessage({
            message: '请选择收款渠道',
            type: 'warning',
        })
        return
    }
    if (!longform.payadmin) {
        ElMessage({
            message: '请选择收款账号',
            type: 'warning',
        })
        return
    }
    if (!longform.creditCodePicture) {
        ElMessage({
            message: '请上传营业执照',
            type: 'warning',
        })
        return
    }
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    ElMessageBox.confirm('确定开通吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            changeclientdetailmsgapi({
                id: companyId.value,
                industry: longform.industry,
                auditStatus: basemsg.auditStatus,
                isOpenPeriod: 1,
                periodCompanyTypeList: longform.bxcompany,
                periodPlanTypeList: longform.bxtype,
                companyAbbreviation: basemsg.companyAbbreviation,
                creditCode: basemsg.creditCode,
                legalPerson: basemsg.legalPerson,
                merchantBankCard: basemsg.merchantBankCard,
                area: basemsg.area,
                channelId: longform.payditch,
                receiptId: longform.payadmin,
                companyName: companyName.value,
                productType: 3,
                openQrProjectEnsure: longform.kjtb,
                creditCodePicture: longform.creditCodePicture
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    uploadImageRef.value.clearFiles()
                    setmarketapi({
                        companyId: companyId.value,
                        id: longbasemsg_dealId.value,
                        productType: 3,
                        saleId: longform.paySaleid,
                        serviceStartTime: `${y}-${m}-01`,
                        serviceState: 0,
                    }).then((res: any) => {
                        if (res.code == 200) {
                            getclientsdetail()
                            getlongbasemsg()
                            ElMessage({
                                type: 'success',
                                message: '修改成功',
                            })
                        }
                    })
                }
            })
        })
        .catch(() => {
            console.log(111)
            getclientsdetail()
            getlongbasemsg()
            ElMessage({
                type: 'info',
                message: '取消修改',
            })
        })
}
const surechangelong = () => {
    if (!longform.paySaleid) {
        ElMessage({
            type: 'warning',
            message: '请选择销售',
        })
        return
    }
    if (!longform.industry) {
        ElMessage({
            type: 'warning',
            message: '请选择销售',
        })
        return
    }
    if (longform.bxcompany.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择保险公司',
        })
        return
    }
    if (longform.bxtype.length === 0) {
        ElMessage({
            type: 'warning',
            message: '请选择投保方案',
        })
        return
    }
    if (!longform.payditch) {
        ElMessage({
            message: '请选择收款渠道',
            type: 'warning',
        })
        return
    }
    if (!longform.payadmin) {
        ElMessage({
            message: '请选择收款账号',
            type: 'warning',
        })
        return
    }
    if (!longform.creditCodePicture) {
        ElMessage({
            message: '请上传营业执照',
            type: 'warning',
        })
        return
    }
    const y = new Date().getFullYear()
    const m =
        new Date().getMonth() + 1 >= 10
            ? new Date().getMonth() + 1
            : '0' + (new Date().getMonth() + 1)
    ElMessageBox.confirm('确定修改吗', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
    })
        .then(() => {
            changeclientdetailmsgapi({
                id: companyId.value,
                auditStatus: basemsg.auditStatus,
                isOpenPeriod: 1,
                periodCompanyTypeList: longform.bxcompany,
                periodPlanTypeList: longform.bxtype,
                companyAbbreviation: basemsg.companyAbbreviation,
                creditCode: basemsg.creditCode,
                legalPerson: basemsg.legalPerson,
                merchantBankCard: basemsg.merchantBankCard,
                area: basemsg.area,
                channelId: longform.payditch,
                receiptId: longform.payadmin,
                companyName: companyName.value,
                industry: longform.industry,
                productType: 3,
                openQrProjectEnsure: longform.kjtb,
                creditCodePicture: longform.creditCodePicture
            }).then((res: any) => {
                console.log(res, 'gdfsyuhihudfghui')
                if (res.code === 200) {
                    uploadImageRef.value.clearFiles()
                    if (longbasemsg_salesId.value === null) {
                        setmarketapi({
                            companyId: companyId.value,
                            id: longbasemsg_dealId.value,
                            productType: 3,
                            saleId: longform.paySaleid,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code == 200) {
                                getclientsdetail()
                                getlongbasemsg()
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                            }
                        })
                    } else {
                        changemarketapi({
                            companyId: companyId.value,
                            id: longbasemsg_dealId.value,
                            productType: 3,
                            saleId: longform.paySaleid,
                            saleOldId: longbasemsg_salesId.value,
                            serviceStartTime: `${y}-${m}-01`,
                            serviceState: 0,
                        }).then((res: any) => {
                            if (res.code == 200) {
                                getclientsdetail()
                                getlongbasemsg()
                                // router.go(0)
                                ElMessage({
                                    type: 'success',
                                    message: '修改成功',
                                })
                            }
                        })
                    }
                }
            })
        })
        .catch(() => {
            console.log(111)
            getclientsdetail()
            getlongbasemsg()
            ElMessage({
                type: 'info',
                message: '取消修改',
            })
        })
}
const longform = reactive<any>({
    khtb: null,
    paySaleid: null,
    payadmin: null,
    payditch: null,
    bxcompany: [],
    bxtype: [],
    industry: '',
    disabledbxcompany: [],
    disabledbxtype: [],
    creditCodePicture: ''
})
const bulletform = reactive<any>({
    payKtzh: [],
    bulletform: '',
    paySaleid: null,
    payditch: null,
    payadmin: null,
    address: '',
    gsjc: '',
    yyzzbm: '',
    frxm: '',
    khhjhh: '',
    shh: '',
    dred: '',
    drklqed: '',
    yyzzaddress: '',
})
const allseller = ref<any>([])
// 获取销售
const getmarket = async () => {
    const res: any = await getmarketapi()
    console.log(res, '销售列表')
    allseller.value = res
}
const messagesubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
            // console.log("submit!");
            getmessageauditapi({
                operateFlag: 1,
                receiptId: messageruleForm.receptid,
                payMode: messageruleForm.paymode,
                remark: messageruleForm.remak,
                companyId: companyId.value,
                id: messageruleForm.id,
            }).then((res: any) => {
                console.log(res)
                messageaudit.value = false
                messageresetForm(messageruleFormRef.value)
                getzhmxlist()
            })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const messagereject = (val: string) => {
    reject.value = true
    butype.value = val
    Causeofrejection.value = ''
}
const reject = ref(false)
const butype = ref('')
const Causeofrejection = ref('')
const messagerules = reactive<FormRules>({
    paymode: [
        {
            required: true,
            message: '请选择付款方式',
            trigger: 'change',
        },
    ],
    receptid: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
})
const longreject = (val: string) => {
    reject.value = true
    butype.value = val
    Causeofrejection.value = ''
}
const longsubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
            // console.log("submit!");
            getlongtimeinsuranceauditapi({
                operateFlag: 1,
                receiptId: longruleForm.receptid,
                payMode: longruleForm.paymode,
                remark: longruleForm.remak,
                companyId: companyId.value,
                id: longruleForm.id,
            }).then((res: any) => {
                console.log(res)
                longaudit.value = false
                longresetForm(longruleFormRef.value)
                getzhmxlist()
            })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const longpayrules = reactive<FormRules>({
    receiptId: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
    payMode: [
        {
            required: true,
            message: '请选择充值方式',
            trigger: 'change',
        },
    ],
    rechargeAmount: [
        {required: true, message: '请输入充值金额', trigger: 'blur'},
    ],
})
const longrules = reactive<FormRules>({
    paymode: [
        {
            required: true,
            message: '请选择付款方式',
            trigger: 'change',
        },
    ],
    receptid: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
})
const everysubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
            // console.log("submit!");
            geteverydayinsuranceauditapi({
                operateFlag: 1,
                receiptId: everyruleForm.receptid,
                payMode: everyruleForm.paymode,
                remark: everyruleForm.remak,
                companyId: companyId.value,
                id: everyruleForm.id,
            }).then((res: any) => {
                console.log(res)
                everyaudit.value = false
                everyresetForm(bullruleFormRef.value)
                getzhmxlist()
            })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const bullreject = (val: string) => {
    reject.value = true
    butype.value = val
    Causeofrejection.value = ''
}
const everyreject = (val: string) => {
    reject.value = true
    butype.value = val
    Causeofrejection.value = ''
}
const everypayrules = reactive<FormRules>({
    receiptId: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
    payMode: [
        {
            required: true,
            message: '请选择充值方式',
            trigger: 'change',
        },
    ],
    rechargeAmount: [
        {required: true, message: '请输入充值金额', trigger: 'blur'},
    ],
})
const everyrules = reactive<FormRules>({
    paymode: [
        {
            required: true,
            message: '请选择付款方式',
            trigger: 'change',
        },
    ],
    receptid: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
})
const bullsubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
            // console.log("submit!");
            getbulletpayrollapi({
                id: bullruleForm.id,
                companyId: bullruleForm.companyId,
                status: 1,
                payMode: bullruleForm.paymode,
                remark: bullruleForm.remak,
                receiptId: bullruleForm.receptid,
                buySeatCount: bullruleForm.otherseat,
                salesScenario: bullruleForm.salesScenario,
                rechargeAmount: bullruleForm.paym,
                accountExpireTime: new Date(bullruleForm.overtime),
                seatExpireTime: new Date(bullruleForm.seatovertime),
            }).then((res: any) => {
                // console.log(res);
                bullaudit.value = false
                bullresetForm(bullruleFormRef.value)
                getzhmxlist()
            })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const elesubmitForm = async (formEl: FormInstance | undefined) => {
    if (!formEl) return
    await formEl.validate((valid, fields) => {
        if (valid) {
            // console.log("submit!");
            getelectronicvisaauditapi({
                id: eleruleForm.id,
                companyId: companyId.value,
                status: 1,
                payMode: eleruleForm.paymode,
                remark: eleruleForm.remak,
                receiptId: eleruleForm.receptid,
            }).then((res: any) => {
                // console.log(res);
                eleaudit.value = false
                eleresetForm(eleruleFormRef.value)
                getzhmxlist()
            })
        } else {
            console.log('error submit!', fields)
        }
    })
}
const elereject = (val: string) => {
    reject.value = true
    butype.value = val
    Causeofrejection.value = ''
}
const paytypes = ref([
    {
        value: 1,
        label: '公对公',
    },
    {
        value: 2,
        label: '微信',
    },
    {
        value: 3,
        label: '私对公',
    },
    {
        value: 4,
        label: '赠送',
    },
])
const elerules = reactive<FormRules>({
    paymode: [
        {
            required: true,
            message: '请选择付款方式',
            trigger: 'change',
        },
    ],
    receptid: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
})
const bullrules = reactive<FormRules>({
    paymode: [
        {
            required: true,
            message: '请选择付款方式',
            trigger: 'change',
        },
    ],
    receptid: [
        {
            required: true,
            message: '请选择收款账户',
            trigger: 'change',
        },
    ],
})
const bullhideout = () => {
    bullaudit.value = false
}
const elehideout = () => {
    eleaudit.value = false
}

const longhideout = () => {
    longaudit.value = false
}
const messagehideout = () => {
    messageaudit.value = false
}

const everyhideout = () => {
    everyaudit.value = false
}
const audittitle = ref('')
const bullaudit = ref(false)
const eleaudit = ref(false)
const everyaudit = ref(false)
const longaudit = ref(false)
const messageaudit = ref(false)
const allowoperate = ref(false)
const bullresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
}
const eleresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
}
const bullruleFormRef = ref<FormInstance>()
const eleruleFormRef = ref<FormInstance>()
const everyruleFormRef = ref<FormInstance>()
const longruleFormRef = ref<FormInstance>()
const messageruleFormRef = ref<FormInstance>()
const bullruleForm = reactive({
    salesScenario: '',
    id: 0,
    companyId: 0,
    remak: '',
    otherseat: '',
    receptid: '',
    paymode: '',
    overtime: '',
    seatovertime: '',
    paym: '',
    price: '',
    package: '暂无套餐',
    img: '',
})
const longruleForm = reactive({
    id: 0,
    companyId: 0,
    remak: '',
    receptid: '',
    paymode: '',
    price: '',
    img: '',
})
const everyruleForm = reactive({
    id: 0,
    companyId: 0,
    remak: '',
    receptid: '',
    paymode: '',
    price: '',
    img: '',
})
const eleruleForm = reactive({
    id: 0,
    companyId: 0,
    remak: '',
    receptid: '',
    paymode: '',
    price: '',
    img: '',
    num: '0',
})
const messageruleForm = reactive({
    id: 0,
    companyId: 0,
    remak: '',
    receptid: '',
    paymode: '',
    price: '',
    img: '',
})
const checkfksh = (val: any, type: any) => {
    // console.log(val,type, '121231313131')
    // console.log(new Date(dayjs(dayjs(new Date()).format("YYYY-MM-DD").toString()).add(1, 'month').toString()).toLocaleString(),'dsfhglhd')
    getalladmin()
    if (type === 'check') {
        allowoperate.value = true
        if (val.productType == 0) {
            if (val.salesScenario === 1) {
                bullruleForm.overtime = new Date(
                    dayjs(val.accountExpireTime.toString())
                        .add(val.rechargeAmount, 'month')
                        .toString()
                ).toLocaleString()
                bullruleForm.seatovertime = ''
            }
            if (val.salesScenario === 2) {
                bullruleForm.seatovertime = new Date(
                    dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                        .add(val.rechargeAmount, 'month')
                        .toString()
                ).toLocaleString()
                bullruleForm.overtime = ''
            }
            if (val.salesScenario === 3) {
                bullruleForm.overtime = new Date(
                    dayjs(val.accountExpireTime.toString())
                        .add(val.rechargeAmount, 'month')
                        .toString()
                ).toLocaleString()
                bullruleForm.seatovertime = new Date(
                    dayjs(dayjs(new Date()).format('YYYY-MM-DD').toString())
                        .add(val.rechargeAmount, 'month')
                        .toString()
                ).toLocaleString()
            }
        }
    } else if (type === 'look') {
        console.log(val, type, '121231313131')
        bullruleForm.seatovertime = ''
        bullruleForm.overtime = ''
        allowoperate.value = false
        if (val.productType == 0) {
            bullruleForm.seatovertime = val.seatExpirationTime
            bullruleForm.overtime = val.dueDate
        }
    }
    if (val.productType == 0) {
        bullresetForm(bullruleFormRef.value)
        bullruleForm.remak = val.remark
        bullruleForm.paymode = val.payMode
        bullaudit.value = true
        bullruleForm.img = val.voucherUrl
        bullruleForm.price = val.operateAmount
        bullruleForm.paym = val.rechargeAmount
        bullruleForm.id = val.id
        bullruleForm.remak = val.remark
        bullruleForm.receptid = val.receiptId
        bullruleForm.companyId = companyId.value
        bullruleForm.otherseat = val.buySeatCount
        bullruleForm.salesScenario = val.salesScenario
    } else if (val.productType == 1) {
        eleaudit.value = true
        eleresetForm(eleruleFormRef.value)
        eleruleForm.remak = val.remark
        eleruleForm.paymode = val.payMode
        eleruleForm.img = val.voucherUrl
        eleruleForm.price = val.operateAmount
        eleruleForm.id = val.id
        eleruleForm.remak = val.remark
        eleruleForm.receptid = val.receiptId
        eleruleForm.companyId = val.companyId
        eleruleForm.num = val.rechargeAmount
    } else if (val.productType == 2) {
        everyresetForm(everyruleFormRef.value)
        everyruleForm.remak = val.remark
        everyruleForm.paymode = val.payMode
        everyaudit.value = true
        everyruleForm.img = val.voucherUrl
        everyruleForm.price = val.operateAmount
        everyruleForm.receptid = val.receiptId
        everyruleForm.id = val.id
        everyruleForm.remak = val.remark
        everyruleForm.companyId = val.companyId
    } else if (val.productType == 3) {
        longaudit.value = true
        longresetForm(longruleFormRef.value)
        longruleForm.remak = val.remark
        longruleForm.paymode = val.payMode
        longruleForm.img = val.voucherUrl
        longruleForm.receptid = val.receiptId
        longruleForm.price = val.operateAmount
        longruleForm.id = val.id
        longruleForm.remak = val.remark
        longruleForm.companyId = val.companyId
    } else if (val.productType == 7) {
        messageaudit.value = true
        messageresetForm(messageruleFormRef.value)
        messageruleForm.remak = val.remark
        messageruleForm.paymode = val.payMode
        messageruleForm.img = val.voucherUrl
        messageruleForm.receptid = val.receiptId
        messageruleForm.price = val.operateAmount
        messageruleForm.id = val.id
        messageruleForm.remak = val.remark
        messageruleForm.companyId = val.companyId
    }
}
const everyresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
}
const longresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
}
const messageresetForm = (formEl: FormInstance | undefined) => {
    if (!formEl) return
    formEl.resetFields()
}
const uploadzhmxcancel = () => {
    choosetimetz.value = false
    uploadtime.value = []
}
const InsurComCompanyPlansexport = () => {
    InsurComCompanyPlansexportapi({
        companyId: companyId.value,
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
    })
}
const uploadzhmxok = () => {
    console.log(uploadtime.value)
    exportaccountdetailsapi({
        companyId: companyId.value,
        productType: producttype.value,
        type: operatetype.value,
        payMode: payfn.value,
        startTime: uploadtime.value[0],
        endTime: uploadtime.value[1],
    }).then((res: any) => {
        console.log(res)
        window.location.href =
            baseurl + '/common/download?delete=true&fileName=' + res
        uploadtime.value = []
        choosetimetz.value = false
    })
}
const uploadzhmx = () => {
    choosetimetz.value = true
}
const choosetimetz = ref(false)
const uploadtime = ref<any>([])
const changeproducttype = (val: any) => {
    console.log(val, '121212121')
    if (val === '0') {
        showtbflag.value = false
        operatetype.value = ''
    } else {
        showtbflag.value = true
    }
    getzhmxlist()
}
const showtbflag = ref(true)
const changeoperatetype = (val: any) => {
    console.log(val, '1212121')
    if (val === '1') {
        showpaymodeflag.value = true
    } else {
        showpaymodeflag.value = false
        payfn.value = ''
    }
    getzhmxlist()
}
const showpaymodeflag = ref(false)
const checkczpzimg = ref('')
const checkczpz = (url: any) => {
    checkczpzimg.value = url
    // dialogczpzVisible.value = true
    showPreview.value = true
    previewUrl.value = url
}
const dialogczpzVisible = ref(false)
const zhmxhandleSizeChange = (val: any) => {
    zhmxpagenum.value = 1
    zhmxpagesize.value = val
    getzhmxlist()
}
const zhmxhandleCurrentChange = (val: any) => {
    zhmxpagenum.value = val
    getzhmxlist()
}
const zhmxtableData = ref<any>([])
const zhmxpagesize = ref(10)
const zhmxpagenum = ref(1)
const zahmxtotal = ref(0)
const getzhmxlist = async () => {
    const res: any = await getzhmxlistapi({
        companyId: companyId.value,
        productType: producttype.value,
        type: operatetype.value,
        pageSize: zhmxpagesize.value,
        pageNum: zhmxpagenum.value,
        payMode: payfn.value,
    })
    console.log(res, '12314323342')
    zhmxtableData.value = res.list
    zahmxtotal.value = res.totalCount
}
const resetpasswordcancel = () => {
    dialogresetpasswordcVisible.value = false
    resetpasswordform.password = ''
}
const resetpasswordformpc = reactive({
    id: 0,
    password: '',
} as any)
const dialogresetpasswordcVisiblepc = ref(false)
const resetpasswordcancelpc = () => {
    dialogresetpasswordcVisiblepc.value = false
    resetpasswordformpc.password = ''
    resetpasswordformpc.id = ''
}
const resetpasswordokpc = () => {
    ElMessageBox.confirm(
        '重置密码后客户密码将被更改，请及时提醒客户更改密码。',
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        }
    )
        .then(() => {
            resetpasswordapipc({
                password: resetpasswordformpc.password,
                saasUserId: resetpasswordformpc.id,
            }).then((res) => {
                console.log(res)
                ElMessage({
                    type: 'success',
                    message: '操作成功',
                })
                resetpasswordcancelpc()
                getteam(companyId.value)
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消',
            })
        })
}
const resetpasswordok = () => {
    ElMessageBox.confirm(
        '重置密码后客户密码将变为初始密码，请及时提醒客户更改密码。',
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        }
    )
        .then(() => {
            resetpasswordapi({
                id: resetpasswordform.id,
                password: resetpasswordform.password,
                userType: '02',
            }).then((res) => {
                console.log(res)
                ElMessage({
                    type: 'success',
                    message: '操作成功',
                })
                resetpasswordcancel()
                getteam(companyId.value)
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消',
            })
        })
}
const dialogresetpasswordcVisible = ref(false)
const okornologin = (val: any) => {
    let cstatus = 0
    if (val.status === 0) {
        cstatus = 1
        ElMessageBox.confirm(
            '禁止登录后，该账号将无法登录子弹发薪平台，确定禁止吗？',
            '提示',
            {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
            }
        )
            .then(() => {
                okornologinapi({status: cstatus, userId: val.userId}).then(
                    (res) => {
                        console.log(res)
                        ElMessage({
                            type: 'success',
                            message: '操作成功',
                        })
                        getteam(companyId.value)
                    }
                )
            })
            .catch(() => {
                getteam(companyId.value)
                ElMessage({
                    type: 'info',
                    message: '取消',
                })
            })
    } else {
        cstatus = 0
        okornologinapi({status: cstatus, userId: val.userId}).then((res) => {
            console.log(res)
            getteam(companyId.value)
        })
    }
    // console.log(val);
    // let cstatus = "";
    // if (val.status === "0") {
    //   cstatus = "1";
    // } else {
    //   cstatus = "0";
    // }
    // okornologinapi({ status: cstatus, userId: val.userId }).then((res) => {
    //   console.log(res);
    //   getteam(companyId.value);
    // });
}
const openresetpasswordzzc = (val: any) => {
    // console.log(val);
    resetpasswordform.id = val.id
    dialogresetpasswordcVisible.value = true
}
const openresetpasswordzzcpc = (val: any) => {
    console.log(val)
    resetpasswordformpc.id = val.userId
    dialogresetpasswordcVisiblepc.value = true
}

const resetpasswordform = reactive({
    id: 0,
    password: '',
})
const setadmins = (val: any) => {
    console.log(val)
    var cisAdmin = 0
    if (val.isAdmin === 0) {
        cisAdmin = 1
    } else {
        cisAdmin = 0
    }
    setorcanceladminapi({
        companyId: val.companyId,
        isAdmin: cisAdmin,
        type: 0,
        userId: val.userId,
    }).then((res: any) => {
        console.log(res)
        getteam(companyId.value)
    })
}
const setorcanceladmin = (val: any) => {
    // console.log(val);
    setorcanceladminapi({
        companyId: val.companyId,
        isAdmin: 1,
        type: 1,
        userId: val.userId,
    }).then((res: any) => {
        // console.log(res);
        if (res.code === 200) {
            ElMessage({
                message: '修改成功',
                type: 'success',
            })
            getteam(companyId.value)
        }
    })
}
const openpczzc = (val: any) => {
    changeroleandopenpc.companyId = val.companyId
    changeroleandopenpc.id = val.id
    dialogchangeroleoropenpcVisible.value = true
    changeroleoropenpctitle.value = '开通PC'
}
const changeroleoropenpcok = () => {
    if (changeroleoropenpctitle.value === '开通PC') {
        openpcapi({
            id: changeroleandopenpc.id,
            roleKey: changeroleandopenpc.roleKey,
            type: 'payManager',
        }).then((res: any) => {
            console.log(res)
            dialogchangeroleoropenpcVisible.value = false
            getteam(companyId.value)
        })
    } else {
        changeteamroleapi({
            companyId: changeroleandopenpc.companyId,
            id: changeroleandopenpc.id,
            roleKey: changeroleandopenpc.roleKey,
        }).then((res: any) => {
            console.log(res)
            dialogchangeroleoropenpcVisible.value = false
            getteam(companyId.value)
        })
    }
}
const dialogchangeroleoropenpcVisible = ref(false)
const changeroleandopenpc = reactive({
    id: 0,
    roleKey: '',
    companyId: 0,
})
const teamhandleCurrentChange = (val: any) => {
    teamcurrentPage.value = val
    getteam(companyId.value)
}
const teamhandleSizeChange = (val: any) => {
    teampageSize.value = val
    teamcurrentPage.value = 1
    getteam(companyId.value)
}
const changeroleusername = ref('')
const changeroleuserid = ref(0)
const changeroleoropenpctitle = ref('')
const changeroleapizzc = (val: any) => {
    changeroleuserid.value = val.userId
    changeroleusername.value = val.userName
    changeroleandopenpc.companyId = val.companyId
    changeroleandopenpc.id = val.id
    dialogchangeroleoropenpcVisible.value = true
    changeroleoropenpctitle.value = '修改角色'
}
const paybasemsg_accountExpireTime = ref('')
const paybasemsg_saleId = ref('')
const paybasemsg_dealId = ref('')
const paybasemsg_payProductOpenTime = ref('')
const paybasemsg_isOpenPaySalary = ref<any>(0)
const paybasemsg_isOpenAlipay = ref<any>(0)
const alipayRegisterStatus = ref<any>(0)
const paybasemsg_phone = ref('')
const paybasemsg_superParentName = ref('')
const paybasemsg_validTime = ref('')
const paybasemsg_patMoneyCount = ref('')
const paybasemsg_payAccountBalance = ref('')
const paybasemsg_saleName = ref('')
const payBasicInfo = ref({})
const getbulletpayrollmsg = async () => {
    const res: any = await getbulletpayrollmsgapi(companyId.value)
    console.log(res, '子弹发薪基本信息')
    payBasicInfo.value = res
    paybasemsg_accountExpireTime.value = res.accountExpireTime
    paybasemsg_saleId.value = res.saleId
    paybasemsg_dealId.value = res.dealId
    paybasemsg_payProductOpenTime.value = res.payProductOpenTime
    paybasemsg_isOpenPaySalary.value = res.isOpenPaySalary
    paybasemsg_isOpenAlipay.value = res.isOpenAlipay
    alipayRegisterStatus.value = res.alipayRegisterStatus
    paybasemsg_phone.value = res.phone
    paybasemsg_superParentName.value = res.superParentName
    paybasemsg_validTime.value = res.validTime
    paybasemsg_patMoneyCount.value = res.patMoneyCount
    paybasemsg_payAccountBalance.value = res.payAccountBalance
    paybasemsg_saleName.value = res.saleName
    bulletform.paySaleid = res.saleId
    bulletform.payditch = res.channelId
    bulletform.payadmin = res.receiptId
    tyrbform.payditch = res.channelId
    tyrbform.payadmin = res.receiptId
    bulletform.payKtzh = []
    if (res.isOpenWechatPay === 1) {
        bulletform.payKtzh.push('1')
    }
    if (res.isOpenAlipay === 1) {
        bulletform.payKtzh.push('2')
    }
    getditchskadminapi(bulletform.payditch).then((res: any) => {
        console.log(res, 1112)
        payadminlist.value = res.list
        skzhlistzdfx.value = res.list
    })
}
const payadminlist = ref<any>([])
const teamcurrentPage = ref(1)
const teampageSize = ref(10)
const teamtotal = ref(0)
const teamtableData = ref<any>([])
const getteam = (id: any) => {
    getteamapi({
        companyId: id ? id : companyId.value,
        pageNum: teamcurrentPage.value,
        pageSize: teampageSize.value,
        searchText: teamserchText.value,
    }).then((res: any) => {
        console.log(res, '团队成员列表')
        teamtotal.value = res.totalCount
        teamtableData.value = res.list
    })
}
const changeteamfilter = () => {
    shake(getteam, 500)
}
const teamserchText = ref('')
const getditchskadmin = async () => {
    const res: any = await getditchskadminapi(ditch.value, {noLoading: true})
    console.log(res, '获取渠道对应收款账户')
    skzhlist.value = res.list
}
const skzhlist = ref<any>([])
const skzhlistzdfx = ref<any>([])
const skzhlistlong = ref<any>([])
const skzhlistday = ref<any>([])
const skzhlisttyrb = ref<any>([])
const editform = reactive({
    companyAbbreviation: '',
    area: '',
    personSingleQuota: '',
    dailyQuota: '',
    subMchid: '',
    creditCode: '',
    receiptId: '',
    merchantBankCard: '',
    legalPerson: '',
    yyzzarea: '',
})
const derivebasemsg = async () => {
    const res = await derivebasemsgapi(companyId.value)
    console.log(res, '导出基本信息')
    ElMessage({
        message: '导出成功',
        type: 'success',
    })
    window.location.href =
        baseurl + '/common/download?delete=true&fileName=' + res
}
const openeditbox = () => {
    getditchskadmin()
    editform.area = basemsg.area
    editform.yyzzarea = basemsg.businessLicenseAddress
    editform.receiptId = basemsg.receiptId
    editform.companyAbbreviation = basemsg.companyAbbreviation
    editform.personSingleQuota = basemsg.personSingleQuota
    editform.creditCode = basemsg.creditCode
    editform.legalPerson = basemsg.legalPerson
    editform.merchantBankCard = basemsg.merchantBankCard
    editform.dailyQuota = basemsg.dailyQuota
    editform.subMchid = basemsg.subMchid
    dialogbasemsgVisible.value = true
}
const editbasemsgcancel = () => {
    editform.area = ''
    editform.receiptId = ''
    editform.companyAbbreviation = ''
    editform.personSingleQuota = ''
    editform.creditCode = ''
    editform.legalPerson = ''
    editform.merchantBankCard = ''
    editform.dailyQuota = ''
    editform.subMchid = ''
    dialogbasemsgVisible.value = false
    getclientsdetail()
}
const editbasemsgsure = () => {
    changeclientdetailmsg()
}
const dialogbasemsgVisible = ref(false)
const ditch = ref('')
const cpayadmin = ref('')
const companyIndustry = ref('')
const companyName = ref('')
const smsBalance = ref(0)
const openProduct = ref<any>([])
const dialogauditVisible = ref(false)
// 审核状态
const cauditStatus = ref('')
const companyId = ref(0)
// 开启公司审核状态弹窗
const chgangecompanystatus = () => {
    dialogauditVisible.value = true
    cauditStatuscopy.value = cauditStatus.value
    getditch()
}
const changepayditch = () => {
    getditchskadminapi(bulletform.payditch, {noLoading: true}).then(
        (res: any) => {
            console.log(res, 1112)
            bulletform.payadmin = null
            // payadminlist.value = res.list;
            skzhlistzdfx.value = res.list
        }
    )
}
const changelongditch = () => {
    getditchskadminapi(longform.payditch, {noLoading: true}).then(
        (res: any) => {
            console.log(res, 1112)
            longform.payadmin = null
            // payadminlist.value = res.list;
            skzhlistlong.value = res.list
        }
    )
}
const changeeveryditch = () => {
    getditchskadminapi(everyform.payditch, {noLoading: true}).then(
        (res: any) => {
            console.log(res, 1112)
            everyform.payadmin = null
            // payadminlist.value = res.list;
            skzhlistday.value = res.list
        }
    )
}

const changetyditch = () => {
    getditchskadminapi(tyrbform.payditch, {noLoading: true}).then(
        (res: any) => {
            console.log(res, 1112)
            tyrbform.payadmin = null
            // payadminlist.value = res.list;
            skzhlisttyrb.value = res.list
        }
    )
}
// 渠道信息
const ditchoptions = ref<any>([])
// 获取渠道列表
const getditch = () => {
    getditchapi().then((res: any) => {
        console.log(res, 'aaaaaaaa')
        ditchoptions.value = res
    })
}
const companyAbbreviation = ref('')
const cauditStatuscopy = ref('')
const creditCode = ref('')
const subMchid = ref('')
const area = ref('')
const legalPerson = ref('')
const merchantBankCard = ref('')
const changecompanystatusadminlist = ref<any>([])

const focuseeleadmin = async () => {
    const ditchRes = await getditchskadminapi(ditch.value, {noLoading: true})
    eleadminlist.value = (ditchRes as any).list
}
// 获取客户基本信息
const getclientsdetail = async () => {
    const res: any = await getclientsdetailapi(companyId.value)

    const ditchRes = await getditchskadminapi(res.channelId, {noLoading: true})
    payadminlist.value = (ditchRes as any).list
    changecompanystatusadminlist.value = (ditchRes as any).list

    console.log(res, '获取客户基本信息')
    companyName.value = res.companyName
    cauditStatus.value = res.auditStatus
    smsBalance.value = res.smsBalance
    openProduct.value = res.openProduct
    companyAbbreviation.value = res.companyAbbreviation
    creditCode.value = res.creditCode
    subMchid.value = res.subMchid
    area.value = res.area
    legalPerson.value = res.legalPerson
    merchantBankCard.value = res.merchantBankCard
    ditch.value = res.channelId
    cpayadmin.value = res.receiptId
    companyIndustry.value = res.industry + ''
    basemsg = res
    bulletform.address = res.area
    bulletform.gsjc = res.companyAbbreviation
    bulletform.yyzzbm = res.creditCode
    bulletform.frxm = res.legalPerson
    bulletform.khhjhh = res.merchantBankCard
    bulletform.shh = res.subMchid
    bulletform.dred = res.dailyQuota
    bulletform.drkled = res.personSingleQuota
    bulletform.yyzzaddress = res.businessLicenseAddress
    tyrbform.address = res.area
    tyrbform.gsjc = res.companyAbbreviation
    tyrbform.yyzzbm = res.creditCode
    tyrbform.frxm = res.legalPerson
    tyrbform.khhjhh = res.merchantBankCard
    tyrbform.shh = res.subMchid
    tyrbform.dred = res.dailyQuota
    tyrbform.drkled = res.personSingleQuota
    tyrbform.yyzzaddress = res.businessLicenseAddress
}
const eleadminlist = ref<any>([])
const getclientsdetailc = async () => {
    const res: any = await getclientsdetailapi(companyId.value)
    companyName.value = res.companyName
    cauditStatus.value = res.auditStatus
    smsBalance.value = res.smsBalance
    openProduct.value = res.openProduct
    companyAbbreviation.value = res.companyAbbreviation
    creditCode.value = res.creditCode
    subMchid.value = res.subMchid
    area.value = res.area
    legalPerson.value = res.legalPerson
    merchantBankCard.value = res.merchantBankCard
    ditch.value = res.channelId
    cpayadmin.value = res.receiptId
    basemsg = res
    bulletform.address = res.area
    bulletform.gsjc = res.companyAbbreviation
    bulletform.yyzzbm = res.creditCode
    bulletform.frxm = res.legalPerson
    bulletform.khhjhh = res.merchantBankCard
    bulletform.shh = res.subMchid
    bulletform.dred = res.dailyQuota
    bulletform.drkled = res.personSingleQuota
    bulletform.yyzzaddress = res.businessLicenseAddress
    tyrbform.address = res.area
    tyrbform.gsjc = res.companyAbbreviation
    tyrbform.yyzzbm = res.creditCode
    tyrbform.frxm = res.legalPerson
    tyrbform.khhjhh = res.merchantBankCard
    tyrbform.shh = res.subMchid
    tyrbform.dred = res.dailyQuota
    tyrbform.drkled = res.personSingleQuota
    tyrbform.yyzzaddress = res.businessLicenseAddress
}
let basemsg = reactive<any>({})
const changeshStatus = (e: any) => {
    console.log(e)
    cauditStatuscopy.value = e
}
// 弹窗取消关闭公司审核状态弹窗
const companystatuscancel = () => {
    dialogauditVisible.value = false
    getclientsdetail()
}
const submitditch = () => {
    if (!cauditStatuscopy.value) {
        ElMessage.warning('请选择审核状态')
        return
    }
    if (!ditch.value) {
        ElMessage.warning('请选择渠道')
        return
    }
    if (!cpayadmin.value) {
        ElMessage.warning('请选择收款账户')
        return
    }
    if (!companyIndustry.value) {
        ElMessage.warning('请选择所属行业')
        return
    }
    changeclientdetailmsgapi({
        id: companyId.value,
        auditStatus: cauditStatuscopy.value,
        companyAbbreviation: basemsg.companyAbbreviation,
        receiptId: cpayadmin.value,
        creditCode: basemsg.creditCode,
        legalPerson: basemsg.legalPerson,
        industry: companyIndustry.value,
        merchantBankCard: basemsg.merchantBankCard,
        area: basemsg.area,
        channelId: ditch.value,
    }).then((res: any) => {
        console.log(res)
        dialogauditVisible.value = false
        dialogbasemsgVisible.value = false
        getclientsdetail()
        getbulletpayrollmsg()
        if (res.code === 200) {
            ElMessage({
                message: '修改成功。',
                type: 'success',
            })
        }
    })
}
// 修改客户详情信息
const changeclientdetailmsg = () => {
    changeclientdetailmsgapi({
        id: companyId.value,
        auditStatus: cauditStatus.value,
        companyAbbreviation: editform.companyAbbreviation,
        receiptId: editform.receiptId,
        creditCode: editform.creditCode,
        legalPerson: editform.legalPerson,
        merchantBankCard: editform.merchantBankCard,
        area: editform.area,
        channelId: ditch.value,
        dailyQuota: editform.dailyQuota,
        personSingleQuota: editform.personSingleQuota,
        subMchid: editform.subMchid,
        businessLicenseAddress: editform.yyzzarea,
    }).then((res: any) => {
        console.log(res)
        dialogauditVisible.value = false
        dialogbasemsgVisible.value = false
        getclientsdetail()
        getbulletpayrollmsg()
        if (res.code === 200) {
            ElMessage({
                message: '修改成功。',
                type: 'success',
            })
        }
    })
}
// 渠道选择
const changeauditStatus = (e: any) => {
    ditch.value = e
    editform.receiptId = ''
    getditchskadminapi(ditch.value, {noLoading: true}).then((res: any) => {
        changecompanystatusadminlist.value = res.list
        skzhlist.value = res.list
    })
    console.log(cauditStatuscopy.value)
}
const form = reactive({
    name: '',
    date: '',
    region: '',
})
const router = useRouter()
const route = useRoute()
// 收起展开
const spread = () => {
    spreadflag.value = !spreadflag.value
}
const packup = () => {
    spreadflag.value = !spreadflag.value
}
const spreadflag = ref(false)
const longbasemsg_salesId = ref(0)
const longbasemsg_dealId = ref(0)
const longkqed = ref<any>('')
const longbasemsg_totalRechargeAmount = ref('')
const getlongbasemsg = async () => {
    const res: any = await getlongbasemsgapi(companyId.value)
    console.log(res, '长期保基本信息')
    longform.industry = res.industry + ''
    longbasemsg_totalRechargeAmount.value = res.totalRechargeAmount
    longbasemsg_allowOverageEnsure.value = res.allowOverageEnsure
    longbasemsg_claimRate.value = res.claimRate
    longbasemsg_openRebate.value = res.openRebate
    longkqed.value = res.periodOverdraftAmount
    longbasemsg_productOpenTime.value = res.productOpenTime
    longbasemsg_salesName.value = res.salesName
    longbasemsg_salesId.value = res.saleId
    longbasemsg_dealId.value = res.dealId
    longform.payditch = res.channelId
    longform.payadmin = res.receiptId
    longbasemsg_wesureBalance.value = res.wesureBalance
    longbasemsg_refusalGuaranteeStatus.value = res.refusalGuaranteeStatus
    longinsureopenorno.value = res.isOpenPeriod
    longinsureopentime.value = res.productOpenTime
    longform.paySaleid = res.saleId
    longform.kjtb = res.openQrProjectEnsure
    longform.creditCodePicture = res.creditCodePicture || ''
    getditchskadminapi(longform.payditch).then((res: any) => {
        console.log(res, 1112)
        payadminlist.value = res.list
        skzhlistlong.value = res.list
    })
    if (res.periodCompanyTypeList.length === 0) {
        longform.bxcompany = []
        longbxtype.value = []
        longform.bxtype = []
        longform.disabledbxcompany = []
        longform.disabledbxtype = []
    } else {
        longform.bxcompany = res.periodCompanyTypeList
        console.log(res.periodPlanTypeList, '999')
        longbxtype.value = []
        longform.bxcompany.forEach((ele: any, index: any) => {
            getlongtimeinsuranceaudittypeapi(ele).then((res: any) => {
                res.forEach((j: any, i: number) => {
                    j.dictValue = ele + '======' + j.dictValue
                })
                longbxtype.value.push(...res)
                console.log(res, '999')
            })
            longform.bxtype = res.periodPlanTypeList
        })
        longform.disabledbxcompany = res.periodCompanyTypeList
        longform.disabledbxtype = res.periodPlanTypeList
        longform.disabledbxtype.value = []
        longform.bxcompany.forEach((ele: any, index: any) => {
            getlongtimeinsuranceaudittypeapi(ele).then((res: any) => {
                longform.disabledbxtype.value.push(...res)
            })
        })
    }
}
const longinsureopenorno = ref(0)
const longinsureopentime = ref('')
const longbasemsg_refusalGuaranteeStatus = ref(0)
const longbasemsg_allowOverageEnsure = ref('')
const longbasemsg_claimRate = ref('')
const longbasemsg_openRebate = ref(0)
const longbasemsg_productOpenTime = ref('')
const longbasemsg_salesName = ref('')
const longbasemsg_wesureBalance = ref('')
const activeName = ref('1')
const operatetype = ref('')
const payfn = ref('')
const producttype = ref('')
const changepayfn = (e: any) => {
    console.log(e)
}
const back = () => {
    window.history.back()
}
const scroll = ref()
const handleScrollx = () => {
    // console.log('滚动高度', window.pageYOffset);
    // console.log('距离顶部高度', scroll.value.getBoundingClientRect().top);
    totop.value = scroll.value.getBoundingClientRect().top
}
const totop = ref(1000)
const totopflag = ref(false)
const totopflagname = ref(false)
const totopflagtab = ref(false)
window.addEventListener('scroll', handleScrollx, true)

watchEffect(() => {
    if (totop.value <= 50) {
        totopflag.value = true
    } else {
        totopflag.value = false
    }
    if (totop.value <= 260) {
        totopflagname.value = true
    } else {
        totopflagname.value = false
    }
    if (totop.value <= 120) {
        totopflagtab.value = true
    } else {
        totopflagtab.value = false
    }
})
onBeforeUnmount(() => {
    window.removeEventListener('scroll', handleScrollx)
})

const showRate = ref(false)

const handleShowRate = () => {
    console.log(11111, companyId.value)
    showRate.value = true
}

const onShowAlipayWithdraw = () => {
    showAlipayWithdraw.value = true
}
</script>

<style lang="scss" scoped>
.productform {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 25px 25px 16px;

    .formitem {
        display: flex;
        align-items: center;
        margin-top: 16px;

        .lable {
            min-width: 100px;
            text-align: end;
            font-size: 14px;
        }

        .lableform {
            flex: 1;
        }
    }
}

.red {
    color: red;
}

.editformitem {
    display: flex;
    align-items: center;
    margin-bottom: 16px;

    .formitem_l {
        flex: 1;
        display: flex;
        align-items: center;

        span {
            flex-shrink: 0;
            font-size: 14px;
            color: #3d3d3d;
            margin-right: 16px;
        }
    }

    .formitem_r {
        flex: 1;
        display: flex;
        align-items: center;

        span {
            flex-shrink: 0;
            font-size: 14px;
            color: #3d3d3d;
            margin-right: 16px;
            margin-left: 24px;
        }
    }
}

.openproduct {
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
    margin-bottom: 12px;
    display: flex;

    .l {
        padding-right: 20px;
        border-right: 2px solid rgba(216, 216, 216, 1);
        display: flex;
        align-items: center;

        img {
            margin-right: 10px;
        }
    }

    .r {
        padding-left: 20px;
        padding-right: 20px;
        display: flex;
        align-items: center;

        img {
            margin-right: 10px;
        }
    }
}

.blockbox {
    display: flex;
    align-items: center;
}

.insureCheckformlable {
    color: #606266;
    font-size: 14px;
    margin-right: 10px;
}

.insureCheckform {
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px;
    margin-bottom: 16px;

    .form {
        font-size: 14px;
        position: relative;

        .packup {
            position: absolute;
            bottom: 10px;
            right: 40px;
            font-size: 14px;
            color: #9497b1;
            cursor: pointer;
        }
    }

    .formfirst {
        margin-top: 16px;
        position: relative;

        .spread {
            position: absolute;
            right: 40px;
            bottom: 6px;
            color: #9497b1;
            font-size: 14px;
            cursor: pointer;
        }
    }

    .formtop {
        display: flex;
        align-items: center;
        justify-content: space-between;

        .formtopleft {
            display: flex;
            align-items: center;

            .blueblock {
                width: 3px;
                height: 10px;
                background-color: #3e5ff5;
                margin-right: 6px;
            }

            .insuretype {
                font-size: 14px;
                color: #3d3d3d;
            }
        }

        .formtoputils {
            display: flex;
            align-items: center;

            .utilitem {
                display: flex;
                margin-right: 16px;
                font-size: 14px;
                color: #9497b1;
                cursor: pointer;

                img {
                    margin-right: 5px;
                }
            }
        }
    }
}

.insureChecktable {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 32px;
    border: 1px solid #eaeaefed;
}

.first {
    .teametable {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 32px;
        padding: 0 12px;
    }

    .accounttable {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 32px;
        padding: 0 12px;
    }
}

.tabcontentbox {
    width: 100%;
    box-sizing: border-box;
    display: flex;

    .accountinputbox {
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        padding: 0 12px;

        .radiolable {
            min-width: 70px;
            font-size: 14px;
            text-align: end;
            color: #202536;
            margin-right: 8px;
        }
    }

    .accountradiobox {
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 16px;
        padding: 0 12px;

        .radiolable {
            width: 70px;
            font-size: 14px;
            text-align: end;
            color: #202536;
            margin-top: 15px;
            margin-right: 8px;
        }
    }

    .insurerecord {
        width: 100%;
        box-sizing: border-box;
        padding: 0 12px;
        margin-bottom: 32px;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .insurerecorditem {
            box-sizing: border-box;
            padding: 16px;
            flex: 1;
            margin-right: 16px;
            border-radius: 8px;
            border: 1px solid #eaeaef;

            .bottom_info {
                display: flex;
                justify-content: space-between;

                .infoitem {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    flex-direction: column;
                    box-sizing: border-box;
                    padding: 5px;

                    .infolable {
                        margin-top: 20px;
                        font-size: 12px;
                        color: #9497b1;
                    }

                    .infomsg {
                        margin-top: 12px;
                        font-size: 26px;
                        color: #202536;
                    }
                }
            }

            .top_title {
                display: flex;
                align-items: center;
                justify-content: space-between;

                .bord {
                    font-size: 16px;
                    color: #202536;
                }

                .check {
                    font-size: 14px;
                    color: #0256ff;
                    cursor: pointer;
                }
            }
        }

        .insurerecorditem:nth-child(3) {
            margin-right: 0;
        }
    }

    .border_linebox {
        .border_line {
            width: 100%;
            box-sizing: border-box;
            height: 1px;
            background-color: #f4f4f7;
        }

        width: 100%;
        box-sizing: border-box;
        padding: 0 12px;
        margin-bottom: 16px;
    }

    .btnbox {
        display: flex;
        align-items: center;
        padding: 0 12px 16px;
        width: 100%;
        margin-bottom: 16px;
        box-sizing: border-box;
        border-bottom: 1px solid #f4f4f7;

        .wbtn {
            box-sizing: border-box;
            padding: 0 12px;
            min-width: 80px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            border: 1px solid #eaeaef;
            border-radius: 4px;
            font-size: 14px;
            color: #9497b1;
            margin-right: 16px;
            cursor: pointer;
        }

        .bbtn {
            box-sizing: border-box;
            padding: 0 12px;
            min-width: 80px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            border: 1px solid #3e5ff5;
            background-color: #3e5ff5;
            border-radius: 4px;
            font-size: 14px;
            color: #ffffff;
            margin-right: 16px;
            cursor: pointer;
        }
    }

    .msgtable {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 16px;
        padding: 0 12px;

        .table-list {
            border-top: 1px solid #eaeaef;
            border-left: 1px solid #eaeaef;

            .tr {
                width: 100%;
                box-sizing: border-box;
                height: 38px;
                line-height: 38px;
                display: flex;

                .td {
                    height: 100%;
                    box-sizing: border-box;
                    padding: 0 16px;
                    width: 20%;
                    background: #fafafc;
                    border-right: 1px solid #eaeaef;
                    border-bottom: 1px solid #eaeaef;
                }

                .td_content {
                    background-color: #ffffff;
                    width: 30%;
                }

                .maxcontent {
                    width: 80%;
                    background-color: #ffffff;
                }
            }
        }
    }

    .tablebox {
        width: 69%;

        .companyse_time {
            width: 100%;
            box-sizing: border-box;
            padding: 0 12px;
            margin-top: 12px;
            margin-bottom: 12px;
            display: flex;

            .l {
                padding-right: 20px;
                border-right: 2px solid rgba(216, 216, 216, 1);
                display: flex;
                align-items: center;

                img {
                    margin-right: 10px;
                }
            }

            .r {
                padding-left: 20px;
                padding-right: 20px;
                display: flex;
                align-items: center;

                img {
                    margin-right: 10px;
                }
            }
        }

        .title {
            display: flex;
            background: #fafafc;
            border-radius: 4px;
            width: 100%;
            box-sizing: border-box;
            height: 38px;
            display: flex;
            align-items: center;
            margin-bottom: 13px;
            padding: 0 12px;
            font-size: 14px;
            color: #3d3d3d;
        }

        .differenttitle {
            display: flex;
            background: rgba(255, 199, 104, 0.2);
            border-radius: 4px;
            width: 100%;
            box-sizing: border-box;
            height: 38px;
            display: flex;
            align-items: center;
            margin-bottom: 13px;
            padding: 0 12px;
            font-size: 14px;
            color: #3d3d3d;

            span {
                margin-left: 10px;
                font-size: 14px;
            }
        }
    }

    .msgbox {
        width: 30%;
        margin-left: 26px;
        z-index: 90 !important;
        background-color: #ffffff;
        overflow-y: scroll;
        overflow-y: scroll;

        .border {
            border: 1px solid #eaeaef;
            margin-bottom: 16px;
            border-radius: 4px;

            .form {
                width: 100%;
                box-sizing: border-box;
                padding: 16px 16px 24px;
            }

            .top {
                width: 100%;
                box-sizing: border-box;
                padding-left: 16px;
                padding-right: 12px;
                display: flex;
                height: 38px;
                align-items: center;
                justify-content: space-between;
                border-bottom: 1px solid #eaeaef;

                .product {
                    font-size: 14px;
                    color: #3d3d3d;
                }

                .recharge {
                    color: #0256ff;
                    font-size: 14px;
                }
            }
        }
    }
}

.left_btn {
    width: 32px;
    height: 22px;

    img {
        width: 100%;
        height: 100%;
    }
}

.content {
    padding: 16px;
    box-sizing: border-box;
    position: relative;
    height: 96vh;
    overflow: auto;
}

.top_basemsg {
    // position: relative;
    // position: sticky;
    // top: 30px;
    z-index: 100;
    background-color: #ffffff;
    // width: 100%;
    padding: 20px 16px;
    margin-top: 50px;
    border-radius: 8px;

    .nameandststus {
        display: flex;
        margin-bottom: 20px;

        .companyname {
            margin-right: 24px;
            font-size: 16px;
            color: #000000;
            font-weight: 700;
        }
    }

    .btnbox {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;

        .redact {
            font-size: 14px;
            color: #ffffff;
            width: 70px;
            height: 26px;
            border-radius: 4px;
            background: #3e5ff5;
            text-align: center;
            line-height: 26px;
            margin-right: 24px;
            cursor: pointer;
        }

        .export {
            cursor: pointer;
            font-size: 14px;
            color: #9497b1;
            width: 70px;
            height: 26px;
            border-radius: 4px;
            background: #ffffff;
            text-align: center;
            line-height: 26px;
            margin-right: 24px;
            border: 1px solid #f4f4f7;
        }
    }

    .messagebox {
        display: flex;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        box-sizing: border-box;
        padding: 16px;
        border-radius: 4px;
        background-color: #fafafc;
        margin-bottom: 16px;

        .messageitem {
            flex: auto;

            .lable {
                font-size: 12px;
                color: #9497b1;
            }

            .lable_content {
                margin-top: 10px;
                font-size: 14px;
                color: #3d3d3d;
            }
        }
    }
}

.tab {
    margin-top: 16px;
    width: 100%;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    box-sizing: border-box;
}

.fixed {
    height: 50vh !important;
    overflow: auto;
    position: fixed;
    top: 330px;
    right: 36px;
    width: 25% !important;
    padding-bottom: 20vh;
}

.fixedname {
    // position: sticky;
    // top: 90px;
    // z-index: 888;
    background-color: #ffffff;
    width: 100%;
}

.paginationborder {
    border: 1px solid #eaeaef;
    padding-bottom: 16px;
}

.border_none {
    border: none !important;
}

.companystatuslist {
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    width: 100px;
    height: 24px;
    border: 1px solid #ccc;
    cursor: pointer;
    box-sizing: border-box;
    color: #606266;
}

.blue {
    color: #3e5ff5;
}

.pointer {
    cursor: pointer;
}

.drawer {
    .closedrawer {
        cursor: pointer;
        position: fixed;
        top: 50px;
        right: 576px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 59px;
        background-color: #0256ff;
        font-size: 14px;
        color: #ffffff;

        img {
            margin-top: 5px;
        }
    }
}

.drawerele {
    .closedrawer {
        cursor: pointer;
        position: fixed;
        top: 50px;
        right: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 59px;
        background-color: #0256ff;
        font-size: 14px;
        color: #ffffff;

        img {
            margin-top: 5px;
        }
    }
}

.isornoopentag {
    box-sizing: border-box;
    padding: 3px 4px;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
    margin-left: 12px;
}

.bullopen {
    color: #3e5ff5;
    background-color: #ebeffe;
}

.bullclose {
    color: #9497b1;
    background-color: #eaeaef;
}

.opentime {
    margin-left: 12px;
    font-size: 12px;
    color: #9497b1;
}

.switchbox {
    width: 100%;
    box-sizing: border-box;
    padding-top: 25px;
    padding-bottom: 25px;
    border-top: 1px solid #f4f4f7;
    border-bottom: 1px solid #f4f4f7;

    .switchitem {
        width: 100%;
        display: flex;
        align-items: center;

        .switchlable {
            min-width: 70px;
            display: flex;
            align-items: center;
        }

        .switchlablecontent {
            flex: 1;
        }
    }
}

.overagetc_title {
    display: flex;
    align-items: center;
    border-top: 1px solid #f4f4f7;
    margin-top: 16px;
    padding-top: 19px;

    .bord {
        font-size: 14px;
        color: #3d3d3d;
        font-weight: 700;
        margin-top: 0px;
    }

    div {
        font-size: 12px;
        margin-top: 2px;
    }
}

.invoiceclosedrawer {
    cursor: pointer;
    position: fixed;
    top: 50px;
    right: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 59px;
    background-color: #0256ff;
    font-size: 14px;
    color: #ffffff;

    img {
        margin-top: 5px;
    }
}

.addinsuredrawer {
    .closedrawer {
        cursor: pointer;
        position: fixed;
        top: 50px;
        right: 60%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 59px;
        background-color: #0256ff;
        font-size: 14px;
        color: #ffffff;

        img {
            margin-top: 5px;
        }
    }
}

.yjxbtabbox {
    width: 100%;
    display: flex;
    box-sizing: border-box;
    overflow-x: scroll;

    .yjxbtabitem {
        min-width: 100px;
        text-align: center;
        font-size: 14px;
        color: #9497b1;
        margin-right: 16px;
        cursor: pointer;
        padding-bottom: 16px;
        border-bottom: 1px solid #ffffff;
    }
}

.yjxbtop {
    margin-bottom: 20px;
    margin-top: 16px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .yjxbtoptext {
        padding-left: 16px;
        width: 85%;
        background-color: #fff1ec;
        color: #ff7642;
        font-size: 14px;
        height: 34px;
        line-height: 34px;
    }
}

.lablebox {
    display: flex;
    align-items: center;
    margin-right: 50px;

    .lablename {
        color: #9497b1;
        font-size: 16px;
    }

    .lablecontent {
        color: #565868;
        font-size: 16px;
    }
}

.yjxbactive {
    color: #3e5ff5 !important;
    border-bottom: 1px solid #3e5ff5 !important;
}

.insuretypeformitem {
    display: flex;
    align-items: center;
    flex: 1;

    // .formlable {
    //   width: 200px;
    //   height: 30px;
    //   margin-right: -2px;
    //   line-height: 30px;
    //   text-align: center;
    //   font-size: 14px;
    //   border: 1px solid #dcdfe6;
    //   border-top-left-radius: 4px;
    //   border-bottom-left-radius: 4px;
    // }
}

.set-style {
    width: 300px;
    text-align: right;
}

.insuretypeformbox {
    padding-top: 16px;
    padding-bottom: 16px;
    border-top: 1px solid #f4f4f7;
    border-bottom: 1px solid #f4f4f7;
}

.insuretypetitletext {
    width: 100%;
    box-sizing: border-box;
    padding-top: 16px;
    padding-bottom: 16px;
    font-size: 14px;
    color: #3d3d3d;
    font-weight: 700;
}

.oktag {
    min-width: 36px;
    height: 18px;
    line-height: 18px;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 10px;
    text-align: center;
    background-color: #f0fffa;
    color: #3db86d;
    margin-left: 6px;
    padding: 0 3px;
}

.notag {
    padding: 0 3px;
    min-width: 36px;
    height: 18px;
    line-height: 18px;
    border-radius: 3px;
    box-sizing: border-box;
    text-align: center;
    font-size: 10px;
    margin-left: 6px;
    background-color: #ffdcd8;
    color: #e05f42;
}

.checkinsureguaranteeslipdetailtctopbox {
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .checkinsureguaranteeslipdetailtctopitem {
        display: flex;
        align-items: center;
        flex: 1;

        .lablecontent {
            color: #565868;
        }

        .bluetag {
            border-radius: 3px;
            background-color: #dce4fe;
            color: #0256ff;
            font-size: 11px;
            width: 50px;
            height: 19px;
            line-height: 19px;
            text-align: center;
            padding: 0 3px;
            margin-left: 5px;
            opacity: 30%;
        }

        .lable {
            color: #9497b1;
        }
    }
}

.changecompanyinsureplantctop {
    font-size: 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f4f4f7;
    padding-bottom: 24px;

    .changecompanyinsureplantctopitem {
        margin-right: 54px;
        display: flex;
        align-items: center;

        .lable {
            color: #9497b1;
        }

        .lablecontent {
            color: #565868;
        }
    }
}

.changecompanyinsureplantcformbox {
    margin-top: 16px;
    width: 100%;
    box-sizing: border-box;

    .changecompanyinsureplantcformitembox {
        margin-bottom: 16px;
        display: flex;
        align-items: center;

        .changecompanyinsureplantcformitem {
            flex: 1;
            display: flex;
            align-items: center;

            .formlable {
                font-size: 14px;
                color: #202536;
                width: 40%;
                text-align: right;
            }
        }
    }
}

.insureplanactivitybox {
    display: flex;

    .left {
        flex: 1;
        margin-right: 16px;
    }

    .right {
        width: 400px;
        height: 400px;
        border-radius: 4px;
        border: 1px solid #eaeaef;

        .righttitle {
            padding: 12px 16px;
            border-bottom: 1px solid #eaeaef;
            width: 100%;
            box-sizing: border-box;
            font-size: 14px;
            color: #3d3d3d;
        }

        .rightform {
            font-size: 14px;
            color: #202536;
            padding: 16px 22px;
            width: 100%;
            box-sizing: border-box;

            .formitem {
                display: flex;
                align-items: center;
                margin-bottom: 18px;

                .lable {
                    width: 100px;
                }
            }
        }
    }
}

.tagyellow {
    line-height: 20px;
    border-radius: 3px;
    color: #ffa814;
    background-color: #fff4cb;
    width: 50px;
    height: 20px;
    box-sizing: border-box;
    font-size: 11px;
    text-align: center;
}

.tagred {
    line-height: 20px;
    border-radius: 3px;
    color: #ea0000;
    background-color: #ffdcd8;
    width: 50px;
    height: 20px;
    box-sizing: border-box;
    font-size: 11px;
    text-align: center;
}

.tagblue {
    line-height: 20px;
    border-radius: 3px;
    color: #0256ff;
    background-color: #cbd8ff;
    width: 50px;
    height: 20px;
    box-sizing: border-box;
    font-size: 11px;
    text-align: center;
}

.taggray {
    line-height: 20px;
    border-radius: 3px;
    color: #9497b1;
    background-color: #f4f4f7;
    width: 50px;
    height: 20px;
    box-sizing: border-box;
    font-size: 11px;
    text-align: center;
}

.blacktag {
    line-height: 20px;
    border-radius: 3px;
    color: #f4f4f7;
    background-color: #000000;
    width: 50px;
    height: 20px;
    box-sizing: border-box;
    font-size: 11px;
    text-align: center;
}

.jobtabactive {
    background-color: #ebeffe;
    color: #3e5ff5;
    border-left: 2px solid #3e5ff5 !important;
}

.dialogcheckpqdwokVisibletop {
    display: flex;
    align-items: center;

    .topitem {
        margin-right: 20px;
        align-items: center;
        border: 1px solid #dcdfe6;
        border-radius: 4px;

        .area {
            min-width: 72px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            font-size: 12px;
        }
    }
}

.videobox {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: relative;

    .lbtn {
        z-index: 999;
        position: absolute;
        top: 250px;
        left: 0;
    }

    .rbtn {
        z-index: 999;
        position: absolute;
        top: 250px;
        right: 0;
    }

    .video {
        flex: 1;
        width: 100%;
    }
}

.dialogcheckpqdwokVisiblecontent {
    box-sizing: border-box;
    margin-top: 16px;
    border-radius: 8px;
    display: flex;

    .lcontent {
        border: 1px solid #eaeaef;
        box-sizing: border-box;
        padding: 16px;
        border-radius: 6px;
        width: 60%;
        margin-right: 24px;

        .ipt {
            height: 30px;
        }

        .tabbox {
            margin-top: 16px;
            display: flex;

            .tab {
                width: 30%;
                height: 470px;
                overflow-y: scroll;

                .tabitem {
                    width: 100%;
                    box-sizing: border-box;
                    height: 38px;
                    line-height: 38px;
                    padding-left: 18px;
                    border-left: 2px solid #ffffff;
                    cursor: pointer;
                    font-size: 14px;
                }
            }

            .tabcontent {
                width: 70%;
                height: 470px;
                overflow-y: scroll;
                box-sizing: border-box;
                padding-left: 16px;
                font-size: 14px;
            }
        }
    }

    .rcontent {
        width: 39%;
        border: 1px solid #eaeaef;
        box-sizing: border-box;
        padding: 16px;
        border-radius: 6px;

        .jobselected {
            margin-top: 16px;
            width: 100%;
            box-sizing: border-box;
            height: 485px;
            overflow-y: scroll;

            .selectjobitem {
                margin-bottom: 15px;
                display: flex;
                align-items: center;
                width: 100%;
                box-sizing: border-box;
                padding: 6px 8px;

                .jobname {
                    flex: 1;
                    margin-left: 12px;
                    margin-right: 12px;
                    font-size: 12px;
                }
            }

            .selectjobitem:hover {
                background-color: #ebeffd;
                border-radius: 4px;
            }
        }
    }
}

.dialogcheckpqdwokVisiblebtn {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: end;
}

.longinsuretbrygreen {
    font-size: 11px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 2px;
    color: #3db86d;
    background-color: #dcf7ec;
    margin-right: 6px;
}

.longinsuretbryblue {
    font-size: 11px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 2px;
    color: #3e5ff5;
    background-color: #c6d0fd;
    margin-right: 6px;
}

.longinsuretbryred {
    font-size: 11px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 2px;
    color: #ea0000;
    background-color: #ffdcd8;
    margin-right: 6px;
}

.blacktag {
    font-size: 11px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 2px;
    color: #ffffff;
    background-color: #202536;
    margin-right: 6px;
}

.uploadstyle {
    width: 100%;
    box-sizing: border-box;
    height: 30px;
}

.uploadstyle:hover {
    color: #3e5ff5;
}

.invoicetab {
    display: flex;
    flex: 1;
    align-items: center;
    font-size: 14px;
    border-bottom: 1px solid #f4f4f7;
    margin-bottom: 25px;

    .tabitem {
        margin-right: 60px;
        padding-bottom: 18px;
        border-bottom: 1px solid #ffffff;
    }
}

.activeinvoicetab {
    color: #3e5ff5 !important;
    border-bottom: 1px solid #3e5ff5 !important;
    font-weight: 700;
}

.invoiceform {
    display: flex;
    margin-bottom: 16px;
    align-items: center;
    justify-content: flex-start;

    .invoiceformitem {
        flex: 25%;
        box-sizing: border-box;
        padding-right: 16px;
    }
}

.dayRateofclaimtctable {
    border-top: 1px solid #eaeaef;
    border-left: 1px solid #eaeaef;

    .tr {
        width: 100%;
        box-sizing: border-box;
        height: 38px;
        line-height: 38px;
        display: flex;

        .td {
            height: 100%;
            box-sizing: border-box;
            padding: 0 16px;
            width: 20%;
            background: #fafafc;
            border-right: 1px solid #eaeaef;
            border-bottom: 1px solid #eaeaef;
        }

        .td_content {
            background-color: #ffffff;
            width: 30%;
        }

        .maxcontent {
            width: 80%;
            background-color: #ffffff;
        }
    }
}

.green {
    color: #00d679;
}

.oriange {
    color: #ff7642;
}

.dayinsurebasemsgbox {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    margin-bottom: 16px;

    .dayinsurebasemsgboxitem {
        flex: 1;
        display: flex;
        font-size: 16px;

        .lable {
            color: #9497b1;
        }

        .lablecontent {
            color: #565868;
        }
    }
}

.formcontent {
    padding: 0 24px 16px;
    width: 100%;
    box-sizing: border-box;

    .formitem {
        margin-top: 16px;
        display: flex;
        align-items: center;

        .formitemflexone {
            display: flex;
            align-items: center;
            flex: 1;
        }

        .lable {
            min-width: 70px;
            font-size: 14px;
            color: #202536;
            margin-right: 8px;
            text-align: right;
        }
    }
}

.orign {
    color: #ff7642;
}

.clear {
    cursor: pointer;
    margin-right: 20px;
    margin-left: 24px;
    margin-bottom: 35px;
    color: #9497b1;
    font-size: 14px;

    img {
        width: 16px;
        height: 16px;
        margin-right: 6px;
        margin-bottom: -3px;
    }
}

.invoicetcboxtoptab {
    display: flex;
    align-items: cebter;
    justify-content: space-between;
}

.origin {
    color: #ff7642;
}

.changeroleformitem {
    display: flex;
    align-items: center;
}

.changerolelable {
    margin-right: 24px;
}

.flexbetweenbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.txformitem {
    display: flex;
    align-items: center;

    .lable {
        width: 80px;
        font-weight: 700;
    }

    .lablecontent {
        width: 300px;
        display: flex;
        align-items: center;
    }
}

.txinfo {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 80px 0;

    .txinfoitem {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
    }
}

.poa {
    position: absolute;
    top: 0;
    left: -15px;
}

.el-input-number {
    width: 200px;
}

.drawerelecontent {
    margin-top: -20px;

    .top {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .select {
            display: flex;
            align-items: center;

            .lable {
                font-size: 12px;
                padding: 8px 12px;
                color: #202536;
                border: 1px solid #dcdfe6;
                border-right: none;
                width: 100px;
                border-radius: 4px;
                margin-right: -3px;
            }
        }
    }
}

:deep(.el-tabs__header) {
    // position: sticky;
    // top: 200px;
    // z-index: 100;
    background-color: #ffffff;
    padding-top: 10px;
    width: 100%;
}

.fs-18 {
    font-size: 18px;
}

.flex-center {
    display: flex;
    align-items: center;
}

.w60px {
    width: 60px;
}

.wechatbox {
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    background-image: url('../../assets/image/cardbg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 0 18px 0 0;
    min-height: 182px;
    position: relative;

    .tag {
        top: 0;
        right: 0;
        position: absolute;
        height: 22px;
        background-color: #e0eaff;
        border-top-right-radius: 8px;
        border-bottom-left-radius: 8px;
        font-size: 14px;
        color: #0256FF;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tagalipay {
        width: 64px;
    }

    .tagwechat {
        width: 50px;
    }
}

.w-h-20 {
    width: 20px;
    height: 20px;
}

.icontitle {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 24px;

    .icon {
        width: 20px;
        height: 20px;
    }

    .text {
        font-size: 14px;
        color: #3E5FF5;
    }
}

.formlablecontent {
    flex: 1;
}
</style>
